CVE-2022-48978

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
21/10/2024
Last modified:
25/10/2024

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> HID: core: fix shift-out-of-bounds in hid_report_raw_event<br /> <br /> Syzbot reported shift-out-of-bounds in hid_report_raw_event.<br /> <br /> microsoft 0003:045E:07DA.0001: hid_field_extract() called with n (128) &gt;<br /> 32! (swapper/0)<br /> ======================================================================<br /> UBSAN: shift-out-of-bounds in drivers/hid/hid-core.c:1323:20<br /> shift exponent 127 is too large for 32-bit type &amp;#39;int&amp;#39;<br /> CPU: 0 PID: 0 Comm: swapper/0 Not tainted<br /> 6.1.0-rc4-syzkaller-00159-g4bbf3422df78 #0<br /> Hardware name: Google Compute Engine/Google Compute Engine, BIOS<br /> Google 10/26/2022<br /> Call Trace:<br /> <br /> __dump_stack lib/dump_stack.c:88 [inline]<br /> dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106<br /> ubsan_epilogue lib/ubsan.c:151 [inline]<br /> __ubsan_handle_shift_out_of_bounds+0x3a6/0x420 lib/ubsan.c:322<br /> snto32 drivers/hid/hid-core.c:1323 [inline]<br /> hid_input_fetch_field drivers/hid/hid-core.c:1572 [inline]<br /> hid_process_report drivers/hid/hid-core.c:1665 [inline]<br /> hid_report_raw_event+0xd56/0x18b0 drivers/hid/hid-core.c:1998<br /> hid_input_report+0x408/0x4f0 drivers/hid/hid-core.c:2066<br /> hid_irq_in+0x459/0x690 drivers/hid/usbhid/hid-core.c:284<br /> __usb_hcd_giveback_urb+0x369/0x530 drivers/usb/core/hcd.c:1671<br /> dummy_timer+0x86b/0x3110 drivers/usb/gadget/udc/dummy_hcd.c:1988<br /> call_timer_fn+0xf5/0x210 kernel/time/timer.c:1474<br /> expire_timers kernel/time/timer.c:1519 [inline]<br /> __run_timers+0x76a/0x980 kernel/time/timer.c:1790<br /> run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1803<br /> __do_softirq+0x277/0x75b kernel/softirq.c:571<br /> __irq_exit_rcu+0xec/0x170 kernel/softirq.c:650<br /> irq_exit_rcu+0x5/0x20 kernel/softirq.c:662<br /> sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1107<br /> ======================================================================<br /> <br /> If the size of the integer (unsigned n) is bigger than 32 in snto32(),<br /> shift exponent will be too large for 32-bit type &amp;#39;int&amp;#39;, resulting in a<br /> shift-out-of-bounds bug.<br /> Fix this by adding a check on the size of the integer (unsigned n) in<br /> snto32(). To add support for n greater than 32 bits, set n to 32, if n<br /> is greater than 32.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 2.6.20 (including) 4.9.336 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.10 (including) 4.14.302 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.15 (including) 4.19.269 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.20 (including) 5.4.227 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.5 (including) 5.10.159 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11 (including) 5.15.83 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16 (including) 6.0.13 (excluding)
cpe:2.3:o:linux:linux_kernel:6.1:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.1:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.1:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.1:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.1:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.1:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.1:rc7:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.1:rc8:*:*:*:*:*:*