]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
USB HID descriptors may push/pop the current state to allow
authorHans Petter Selasky <hselasky@FreeBSD.org>
Fri, 5 Jun 2020 07:57:16 +0000 (07:57 +0000)
committerHans Petter Selasky <hselasky@FreeBSD.org>
Fri, 5 Jun 2020 07:57:16 +0000 (07:57 +0000)
commiteff815491349029cf24182bfa58613d665b3123e
tree9573410e65eb0787a131b89391b0e60081441531
parent48f25cc3c2bd992488c4670edf487c048d7e4903
USB HID descriptors may push/pop the current state to allow
description of items residing in a so-called union. FreeBSD currently
only supports 4 such pop levels.

If the push level is not restored within the processing of the same
HID item, an invalid memory location may be used for subsequent HID
item processing.

Verify that the push level is always valid when processing HID items.

Reported by: Andy Nguyen (Google)
MFC after: 3 days
Sponsored by: Mellanox Technologies
lib/libusbhid/parse.c
sys/dev/usb/usb_hid.c