diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-02-17 12:21:10 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2021-02-19 11:02:16 -0800 |
commit | 182d679b2298d62bf42bb14b12a8067b8e17b617 (patch) | |
tree | 30f4dd514f60efc32de464610152f11b75e92354 /mm/page_io.c | |
parent | 0958351e93fa0ac142f6dd8bd844441594f30a57 (diff) |
Input: joydev - prevent potential read overflow in ioctl
The problem here is that "len" might be less than "joydev->nabs" so the
loops which verfy abspam[i] and keypam[] might read beyond the buffer.
Fixes: 999b874f4aa3 ("Input: joydev - validate axis/button maps before clobbering current ones")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YCyzR8WvFRw4HWw6@mwanda
[dtor: additional check for len being even in joydev_handle_JSIOCSBTNMAP]
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'mm/page_io.c')
0 files changed, 0 insertions, 0 deletions