]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r361827:
authorhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 8 Jun 2020 09:35:32 +0000 (09:35 +0000)
committerhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 8 Jun 2020 09:35:32 +0000 (09:35 +0000)
commita92df58c26df633770b068e646ebf7053b44db19
tree26a4e7dd9aa12c5b8ec576db6162eba4c2e05d9a
parentee8eed599956c7c685363dc1af3bcfc40aa87155
MFC r361827:
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 push 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)
Sponsored by: Mellanox Technologies

git-svn-id: svn://svn.freebsd.org/base/stable/9@361922 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libusbhid/parse.c
sys/dev/usb/usb_hid.c