aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/trace/events/random.h
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2020-09-01 10:52:33 +0100
committerBenjamin Tissoires <benjamin.tissoires@gmail.com>2020-09-01 12:06:41 +0200
commit35556bed836f8dc07ac55f69c8d17dce3e7f0e25 (patch)
treecb19655e11b5f8113b444b5685ffc5b9372d5046 /include/trace/events/random.h
parentHID: core: Correctly handle ReportSize being zero (diff)
downloadwireguard-linux-35556bed836f8dc07ac55f69c8d17dce3e7f0e25.tar.xz
wireguard-linux-35556bed836f8dc07ac55f69c8d17dce3e7f0e25.zip
HID: core: Sanitize event code and type when mapping input
When calling into hid_map_usage(), the passed event code is blindly stored as is, even if it doesn't fit in the associated bitmap. This event code can come from a variety of sources, including devices masquerading as input devices, only a bit more "programmable". Instead of taking the event code at face value, check that it actually fits the corresponding bitmap, and if it doesn't: - spit out a warning so that we know which device is acting up - NULLify the bitmap pointer so that we catch unexpected uses Code paths that can make use of untrusted inputs can now check that the mapping was indeed correct and bail out if not. Cc: stable@vger.kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Diffstat (limited to 'include/trace/events/random.h')
0 files changed, 0 insertions, 0 deletions