aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
diff options
context:
space:
mode:
authorAlan Stern <[email protected]>2025-07-23 14:37:04 +0000
committerBenjamin Tissoires <[email protected]>2025-07-25 11:45:25 +0000
commita6b87bfc2ab5bccb7ad953693c85d9062aef3fdd (patch)
treed6a04b6df6860716cf58ee1480ada22c0875fcdc /drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
parentHID: core: Improve the kerneldoc for hid_report_len() (diff)
downloadkernel-a6b87bfc2ab5bccb7ad953693c85d9062aef3fdd.tar.gz
kernel-a6b87bfc2ab5bccb7ad953693c85d9062aef3fdd.zip
HID: core: Harden s32ton() against conversion to 0 bits
Testing by the syzbot fuzzer showed that the HID core gets a shift-out-of-bounds exception when it tries to convert a 32-bit quantity to a 0-bit quantity. Ideally this should never occur, but there are buggy devices and some might have a report field with size set to zero; we shouldn't reject the report or the device just because of that. Instead, harden the s32ton() routine so that it returns a reasonable result instead of crashing when it is called with the number of bits set to 0 -- the same as what snto32() does. Signed-off-by: Alan Stern <[email protected]> Reported-by: [email protected] Closes: https://lore.kernel.org/linux-usb/[email protected]/ Tested-by: [email protected] Fixes: dde5845a529f ("[PATCH] Generic HID layer - code split") Cc: [email protected] Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c')
0 files changed, 0 insertions, 0 deletions