summaryrefslogtreecommitdiff
path: root/net/lapb/lapb_timer.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2017-09-18 11:36:45 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-05 09:35:51 +0200
commit50f17a4b9141111a50d9eb127389fa69b2085d7c (patch)
treebac9bdf398e5249f09c09e2f9e611863b10cb21e /net/lapb/lapb_timer.c
parent2d9db72fb50e72aafaac2b99f4fcf1013497d8da (diff)
KEYS: fix writing past end of user-supplied buffer in keyring_read()
commit e645016abc803dafc75e4b8f6e4118f088900ffb upstream. Userspace can call keyctl_read() on a keyring to get the list of IDs of keys in the keyring. But if the user-supplied buffer is too small, the kernel would write the full list anyway --- which will corrupt whatever userspace memory happened to be past the end of the buffer. Fix it by only filling the space that is available. Fixes: b2a4df200d57 ("KEYS: Expand the capacity of a keyring") Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions