diff options
| author | Benjamin Tissoires <bentiss@kernel.org> | 2026-05-04 11:47:22 +0300 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2026-05-12 19:03:37 +0300 |
| commit | 2c85c61d1332e1e16f020d76951baf167dcb6f7a (patch) | |
| tree | e0d6bc40e0c36922e10bc72e2af8d1a136af1c4c /tools/lib/python/kdoc/xforms_lists.py | |
| parent | b08665fe80fab0956e64741c07d9bbcec635c34d (diff) | |
| download | linux-2c85c61d1332e1e16f020d76951baf167dcb6f7a.tar.xz | |
HID: pass the buffer size to hid_report_raw_event
commit 0a3fe972a7cb ("HID: core: Mitigate potential OOB by removing
bogus memset()") enforced the provided data to be at least the size of
the declared buffer in the report descriptor to prevent a buffer
overflow. However, we can try to be smarter by providing both the buffer
size and the data size, meaning that hid_report_raw_event() can make
better decision whether we should plaining reject the buffer (buffer
overflow attempt) or if we can safely memset it to 0 and pass it to the
rest of the stack.
Fixes: 0a3fe972a7cb ("HID: core: Mitigate potential OOB by removing bogus memset()")
Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Acked-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'tools/lib/python/kdoc/xforms_lists.py')
0 files changed, 0 insertions, 0 deletions
