Linux kernel source tree
Go to file
Terry Junge fe7f7ac8e0 HID: usbhid: Eliminate recurrent out-of-bounds bug in usbhid_parse()
Update struct hid_descriptor to better reflect the mandatory and
optional parts of the HID Descriptor as per USB HID 1.11 specification.
Note: the kernel currently does not parse any optional HID class
descriptors, only the mandatory report descriptor.

Update all references to member element desc[0] to rpt_desc.

Add test to verify bLength and bNumDescriptors values are valid.

Replace the for loop with direct access to the mandatory HID class
descriptor member for the report descriptor. This eliminates the
possibility of getting an out-of-bounds fault.

Add a warning message if the HID descriptor contains any unsupported
optional HID class descriptors.

Reported-by: syzbot+c52569baf0c843f35495@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=c52569baf0c843f35495
Fixes: f043bfc98c ("HID: usbhid: fix out-of-bounds bug")
Cc: stable@vger.kernel.org
Signed-off-by: Terry Junge <linuxhid@cosmicgizmosystems.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2025-04-24 11:31:25 +02:00
arch platform-drivers-x86 for v6.15-1 2025-03-26 09:54:40 -07:00
block CRC updates for 6.15 2025-03-25 18:33:04 -07:00
certs sign-file,extract-cert: use pkcs11 provider for OPENSSL MAJOR >= 3 2024-09-20 19:52:48 +03:00
crypto crypto: crct10dif - remove from crypto API 2025-02-08 20:06:30 -08:00
Documentation hid-for-linus-2025032601 2025-03-26 10:05:43 -07:00
drivers HID: usbhid: Eliminate recurrent out-of-bounds bug in usbhid_parse() 2025-04-24 11:31:25 +02:00
fs fscrypt updates for 6.15 2025-03-25 18:31:38 -07:00
include HID: usbhid: Eliminate recurrent out-of-bounds bug in usbhid_parse() 2025-04-24 11:31:25 +02:00
init [ Merge note: this pull request depends on you having merged 2025-03-24 22:06:11 -07:00
io_uring lsm/stable-6.15 PR 20250323 2025-03-25 15:44:19 -07:00
ipc treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
kernel lsm/stable-6.15 PR 20250323 2025-03-25 15:44:19 -07:00
lib CRC updates for 6.15 2025-03-25 18:33:04 -07:00
LICENSES LICENSES: add 0BSD license text 2024-09-01 20:43:24 -07:00
mm A treewide hrtimer timer cleanup 2025-03-25 10:54:15 -07:00
net A treewide hrtimer timer cleanup 2025-03-25 10:54:15 -07:00
rust lsm/stable-6.15 PR 20250323 2025-03-25 15:44:19 -07:00
samples hardening updates for v6.15-rc1 2025-03-24 15:18:08 -07:00
scripts CRC updates for 6.15 2025-03-25 18:33:04 -07:00
security Smack patches for v6.15 2025-03-25 16:04:11 -07:00
sound hid-for-linus-2025032601 2025-03-26 10:05:43 -07:00
tools platform-drivers-x86 for v6.15-1 2025-03-26 09:54:40 -07:00
usr kbuild: hdrcheck: fix cross build with clang 2025-03-05 04:06:45 +09:00
virt ARM: 2025-03-25 14:22:07 -07:00
.clang-format clang-format: Update with v6.11-rc1's for_each macro list 2024-08-02 13:20:31 +02:00
.clippy.toml rust: give Clippy the minimum supported Rust version 2025-01-10 00:17:25 +01:00
.cocciconfig
.editorconfig .editorconfig: remove trim_trailing_whitespace option 2024-06-13 16:47:52 +02:00
.get_maintainer.ignore MAINTAINERS: Retire Ralf Baechle 2024-11-12 15:48:59 +01:00
.gitattributes .gitattributes: set diff driver for Rust source code files 2023-05-31 17:48:25 +02:00
.gitignore rust: use host dylib naming convention to support macOS 2025-01-10 01:01:24 +01:00
.mailmap lsm/stable-6.15 PR 20250323 2025-03-25 15:44:19 -07:00
.rustfmt.toml rust: add .rustfmt.toml 2022-09-28 09:02:20 +02:00
COPYING
CREDITS MAINTAINERS: Move Pavel to kernel.org address 2025-02-07 09:12:33 -08:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS hid-for-linus-2025032601 2025-03-26 10:05:43 -07:00
Makefile [ Merge note: this pull request depends on you having merged 2025-03-24 22:06:11 -07:00
README README: Fix spelling 2024-03-18 03:36:32 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.