This is a note to let you know that I've just added the patch titled s390/zcrypt: Fix ZCRYPT_PERDEV_REQCNT ioctl to the 4.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: s390-zcrypt-fix-zcrypt_perdev_reqcnt-ioctl.patch and it can be found in the queue-4.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From f7e80983f0cf470bb82036e73bff4d5a7daf8fc2 Mon Sep 17 00:00:00 2001 From: Christian Borntraeger <borntraeger@xxxxxxxxxx> Date: Mon, 21 Sep 2020 12:48:36 +0200 Subject: s390/zcrypt: Fix ZCRYPT_PERDEV_REQCNT ioctl From: Christian Borntraeger <borntraeger@xxxxxxxxxx> commit f7e80983f0cf470bb82036e73bff4d5a7daf8fc2 upstream. reqcnt is an u32 pointer but we do copy sizeof(reqcnt) which is the size of the pointer. This means we only copy 8 byte. Let us copy the full monty. Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx> Cc: Harald Freudenberger <freude@xxxxxxxxxxxxx> Cc: stable@xxxxxxxxxxxxxxx Fixes: af4a72276d49 ("s390/zcrypt: Support up to 256 crypto adapters.") Reviewed-by: Harald Freudenberger <freude@xxxxxxxxxxxxx> Signed-off-by: Vasily Gorbik <gor@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/s390/crypto/zcrypt_api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/s390/crypto/zcrypt_api.c +++ b/drivers/s390/crypto/zcrypt_api.c @@ -915,7 +915,8 @@ static long zcrypt_unlocked_ioctl(struct if (!reqcnt) return -ENOMEM; zcrypt_perdev_reqcnt(reqcnt, AP_DEVICES); - if (copy_to_user((int __user *) arg, reqcnt, sizeof(reqcnt))) + if (copy_to_user((int __user *) arg, reqcnt, + sizeof(u32) * AP_DEVICES)) rc = -EFAULT; kfree(reqcnt); return rc; Patches currently in stable-queue which might be from borntraeger@xxxxxxxxxx are queue-4.19/s390-zcrypt-fix-zcrypt_perdev_reqcnt-ioctl.patch queue-4.19/mm-pagewalk-fix-termination-condition-in-walk_pte_ra.patch