diff options
author | Ingo Tuchscherer <ingo.tuchscherer@de.ibm.com> | 2014-03-18 16:30:21 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2014-04-01 09:23:34 +0200 |
commit | ce1ce2f31224c18e84d859ccd5675cbb2728f57a (patch) | |
tree | eebcf330a28c9f39a214443ec575330588c61454 /drivers/s390/crypto/zcrypt_api.c | |
parent | 01d5f3b598b18a5035426c30801adf65822dbd0c (diff) | |
download | op-kernel-dev-ce1ce2f31224c18e84d859ccd5675cbb2728f57a.zip op-kernel-dev-ce1ce2f31224c18e84d859ccd5675cbb2728f57a.tar.gz |
s390/zcrypt: add length check for aligned data to avoid overflow in msg-type 6
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/zcrypt_api.c')
-rw-r--r-- | drivers/s390/crypto/zcrypt_api.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c index 4b824b1..5222ebe 100644 --- a/drivers/s390/crypto/zcrypt_api.c +++ b/drivers/s390/crypto/zcrypt_api.c @@ -626,8 +626,8 @@ static long zcrypt_send_ep11_cprb(struct ep11_urb *xcrb) return -ENOMEM; if (copy_from_user(ep11_dev_list.targets, - (struct ep11_target_dev *)xcrb->targets, - xcrb->targets_num * + (struct ep11_target_dev __force __user *) + xcrb->targets, xcrb->targets_num * sizeof(struct ep11_target_dev))) return -EFAULT; } |