]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/pkey: fix missing length of protected key on return
authorHarald Freudenberger <freude@linux.ibm.com>
Fri, 31 Jan 2020 11:08:31 +0000 (12:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Feb 2020 18:53:04 +0000 (19:53 +0100)
commit9e6874da9446c5eb24328a9a46912bd109a27c06
tree66ef26963ce599a117ec175d1b39dd87a337c9dc
parentebc3ddc1a255cc6e2572ba69df9a3b8cad31e324
s390/pkey: fix missing length of protected key on return

commit aab73d278d49c718b722ff5052e16c9cddf144d4 upstream.

The pkey ioctl call PKEY_SEC2PROTK updates a struct pkey_protkey
on return. The protected key is stored in, the protected key type
is stored in but the len information was not updated. This patch
now fixes this and so the len field gets an update to refrect
the actual size of the protected key value returned.

Fixes: efc598e6c8a9 ("s390/zcrypt: move cca misc functions to new code file")
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reported-by: Christian Rund <RUNDC@de.ibm.com>
Suggested-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/s390/crypto/pkey_api.c