{"id":"CVE-2022-48978","state":"PUBLISHED","title":"HID: core: fix shift-out-of-bounds in hid_report_raw_event","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nHID: core: fix shift-out-of-bounds in hid_report_raw_event\n\nSyzbot reported shift-out-of-bounds in hid_report_raw_event.\n\nmicrosoft 0003:045E:07DA.0001: hid_field_extract() called with n (128) >\n32! (swapper/0)\n======================================================================\nUBSAN: shift-out-of-bounds in drivers/hid/hid-core.c:1323:20\nshift exponent 127 is too large for 32-bit type 'int'\nCPU: 0 PID: 0 Comm: swapper/0 Not tainted\n6.1.0-rc4-syzkaller-00159-g4bbf3422df78 #0\nHardware name: Google Compute Engine/Google Compute Engine, BIOS\nGoogle 10/26/2022\nCall Trace:\n <IRQ>\n __dump_stack lib/dump_stack.c:88 [inline]\n dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106\n ubsan_epilogue lib/ubsan.c:151 [inline]\n __ubsan_handle_shift_out_of_bounds+0x3a6/0x420 lib/ubsan.c:322\n snto32 drivers/hid/hid-core.c:1323 [inline]\n hid_input_fetch_field drivers/hid/hid-core.c:1572 [inline]\n hid_process_report drivers/hid/hid-core.c:1665 [inline]\n hid_report_raw_event+0xd56/0x18b0 drivers/hid/hid-core.c:1998\n hid_input_report+0x408/0x4f0 drivers/hid/hid-core.c:2066\n hid_irq_in+0x459/0x690 drivers/hid/usbhid/hid-core.c:284\n __usb_hcd_giveback_urb+0x369/0x530 drivers/usb/core/hcd.c:1671\n dummy_timer+0x86b/0x3110 drivers/usb/gadget/udc/dummy_hcd.c:1988\n call_timer_fn+0xf5/0x210 kernel/time/timer.c:1474\n expire_timers kernel/time/timer.c:1519 [inline]\n __run_timers+0x76a/0x980 kernel/time/timer.c:1790\n run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1803\n __do_softirq+0x277/0x75b kernel/softirq.c:571\n __irq_exit_rcu+0xec/0x170 kernel/softirq.c:650\n irq_exit_rcu+0x5/0x20 kernel/softirq.c:662\n sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1107\n======================================================================\n\nIf the size of the integer (unsigned n) is bigger than 32 in snto32(),\nshift exponent will be too large for 32-bit type 'int', resulting in a\nshift-out-of-bounds bug.\nFix this by adding a check on the size of the integer (unsigned n) in\nsnto32(). To add support for n greater than 32 bits, set n to 32, if n\nis greater than 32.","publishedAt":"2024-10-21T20:05:57.079Z","updatedAt":"2026-05-11T18:50:50.305Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"dde5845a529ff753364a6d1aea61180946270bfa","status":"affected","lessThan":"151493fe5a6ed1a88decc929a7368a3f2a246914","versionType":"git"},{"version":"dde5845a529ff753364a6d1aea61180946270bfa","status":"affected","lessThan":"809783f8b4b600c7fb3bccb10fefef822601ea3b","versionType":"git"},{"version":"dde5845a529ff753364a6d1aea61180946270bfa","status":"affected","lessThan":"8e14f20e12224ee2429f75a5c9418a700e26a8d3","versionType":"git"},{"version":"dde5845a529ff753364a6d1aea61180946270bfa","status":"affected","lessThan":"db1ed1b3fb4ec0d19080a102956255769bc45c79","versionType":"git"},{"version":"dde5845a529ff753364a6d1aea61180946270bfa","status":"affected","lessThan":"bc03f809da78fc79e4aee132d4e5c6a2b3aeec73","versionType":"git"},{"version":"dde5845a529ff753364a6d1aea61180946270bfa","status":"affected","lessThan":"f755d11c55b29049b77da5cd9ab2faae96eb33c3","versionType":"git"},{"version":"dde5845a529ff753364a6d1aea61180946270bfa","status":"affected","lessThan":"2b3b4d7aadaa1b6b58d0f34823bf86cfe8a31b4d","versionType":"git"},{"version":"dde5845a529ff753364a6d1aea61180946270bfa","status":"affected","lessThan":"ec61b41918587be530398b0d1c9a0d16619397e5","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hid/hid-core.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.20","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.20","versionType":"semver"},{"version":"4.9.336","status":"unaffected","lessThanOrEqual":"4.9.*","versionType":"semver"},{"version":"4.14.302","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.269","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.227","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.159","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.83","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.0.13","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hid/hid-core.c"]}],"references":["https://git.kernel.org/stable/c/151493fe5a6ed1a88decc929a7368a3f2a246914","https://git.kernel.org/stable/c/809783f8b4b600c7fb3bccb10fefef822601ea3b","https://git.kernel.org/stable/c/8e14f20e12224ee2429f75a5c9418a700e26a8d3","https://git.kernel.org/stable/c/db1ed1b3fb4ec0d19080a102956255769bc45c79","https://git.kernel.org/stable/c/bc03f809da78fc79e4aee132d4e5c6a2b3aeec73","https://git.kernel.org/stable/c/f755d11c55b29049b77da5cd9ab2faae96eb33c3","https://git.kernel.org/stable/c/2b3b4d7aadaa1b6b58d0f34823bf86cfe8a31b4d","https://git.kernel.org/stable/c/ec61b41918587be530398b0d1c9a0d16619397e5"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/48xxx/CVE-2022-48978.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-48978","state":"PUBLISHED","datePublished":"2024-10-21T20:05:57.079Z","dateUpdated":"2026-05-11T18:50:50.305Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-08-22T01:27:53.632Z"},"containers":{"cna":{"title":"HID: core: fix shift-out-of-bounds in hid_report_raw_event","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nHID: core: fix shift-out-of-bounds in hid_report_raw_event\n\nSyzbot reported shift-out-of-bounds in hid_report_raw_event.\n\nmicrosoft 0003:045E:07DA.0001: hid_field_extract() called with n (128) >\n32! (swapper/0)\n======================================================================\nUBSAN: shift-out-of-bounds in drivers/hid/hid-core.c:1323:20\nshift exponent 127 is too large for 32-bit type 'int'\nCPU: 0 PID: 0 Comm: swapper/0 Not tainted\n6.1.0-rc4-syzkaller-00159-g4bbf3422df78 #0\nHardware name: Google Compute Engine/Google Compute Engine, BIOS\nGoogle 10/26/2022\nCall Trace:\n <IRQ>\n __dump_stack lib/dump_stack.c:88 [inline]\n dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106\n ubsan_epilogue lib/ubsan.c:151 [inline]\n __ubsan_handle_shift_out_of_bounds+0x3a6/0x420 lib/ubsan.c:322\n snto32 drivers/hid/hid-core.c:1323 [inline]\n hid_input_fetch_field drivers/hid/hid-core.c:1572 [inline]\n hid_process_report drivers/hid/hid-core.c:1665 [inline]\n hid_report_raw_event+0xd56/0x18b0 drivers/hid/hid-core.c:1998\n hid_input_report+0x408/0x4f0 drivers/hid/hid-core.c:2066\n hid_irq_in+0x459/0x690 drivers/hid/usbhid/hid-core.c:284\n __usb_hcd_giveback_urb+0x369/0x530 drivers/usb/core/hcd.c:1671\n dummy_timer+0x86b/0x3110 drivers/usb/gadget/udc/dummy_hcd.c:1988\n call_timer_fn+0xf5/0x210 kernel/time/timer.c:1474\n expire_timers kernel/time/timer.c:1519 [inline]\n __run_timers+0x76a/0x980 kernel/time/timer.c:1790\n run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1803\n __do_softirq+0x277/0x75b kernel/softirq.c:571\n __irq_exit_rcu+0xec/0x170 kernel/softirq.c:650\n irq_exit_rcu+0x5/0x20 kernel/softirq.c:662\n sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1107\n======================================================================\n\nIf the size of the integer (unsigned n) is bigger than 32 in snto32(),\nshift exponent will be too large for 32-bit type 'int', resulting in a\nshift-out-of-bounds bug.\nFix this by adding a check on the size of the integer (unsigned n) in\nsnto32(). To add support for n greater than 32 bits, set n to 32, if n\nis greater than 32."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"dde5845a529ff753364a6d1aea61180946270bfa","status":"affected","lessThan":"151493fe5a6ed1a88decc929a7368a3f2a246914","versionType":"git"},{"version":"dde5845a529ff753364a6d1aea61180946270bfa","status":"affected","lessThan":"809783f8b4b600c7fb3bccb10fefef822601ea3b","versionType":"git"},{"version":"dde5845a529ff753364a6d1aea61180946270bfa","status":"affected","lessThan":"8e14f20e12224ee2429f75a5c9418a700e26a8d3","versionType":"git"},{"version":"dde5845a529ff753364a6d1aea61180946270bfa","status":"affected","lessThan":"db1ed1b3fb4ec0d19080a102956255769bc45c79","versionType":"git"},{"version":"dde5845a529ff753364a6d1aea61180946270bfa","status":"affected","lessThan":"bc03f809da78fc79e4aee132d4e5c6a2b3aeec73","versionType":"git"},{"version":"dde5845a529ff753364a6d1aea61180946270bfa","status":"affected","lessThan":"f755d11c55b29049b77da5cd9ab2faae96eb33c3","versionType":"git"},{"version":"dde5845a529ff753364a6d1aea61180946270bfa","status":"affected","lessThan":"2b3b4d7aadaa1b6b58d0f34823bf86cfe8a31b4d","versionType":"git"},{"version":"dde5845a529ff753364a6d1aea61180946270bfa","status":"affected","lessThan":"ec61b41918587be530398b0d1c9a0d16619397e5","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hid/hid-core.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.20","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.20","versionType":"semver"},{"version":"4.9.336","status":"unaffected","lessThanOrEqual":"4.9.*","versionType":"semver"},{"version":"4.14.302","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.269","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.227","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.159","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.83","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.0.13","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hid/hid-core.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/151493fe5a6ed1a88decc929a7368a3f2a246914"},{"url":"https://git.kernel.org/stable/c/809783f8b4b600c7fb3bccb10fefef822601ea3b"},{"url":"https://git.kernel.org/stable/c/8e14f20e12224ee2429f75a5c9418a700e26a8d3"},{"url":"https://git.kernel.org/stable/c/db1ed1b3fb4ec0d19080a102956255769bc45c79"},{"url":"https://git.kernel.org/stable/c/bc03f809da78fc79e4aee132d4e5c6a2b3aeec73"},{"url":"https://git.kernel.org/stable/c/f755d11c55b29049b77da5cd9ab2faae96eb33c3"},{"url":"https://git.kernel.org/stable/c/2b3b4d7aadaa1b6b58d0f34823bf86cfe8a31b4d"},{"url":"https://git.kernel.org/stable/c/ec61b41918587be530398b0d1c9a0d16619397e5"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T18:50:50.305Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.20","versionEndExcluding":"4.9.336"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.20","versionEndExcluding":"4.14.302"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.20","versionEndExcluding":"4.19.269"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.20","versionEndExcluding":"5.4.227"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.20","versionEndExcluding":"5.10.159"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.20","versionEndExcluding":"5.15.83"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.20","versionEndExcluding":"6.0.13"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.20","versionEndExcluding":"6.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2022-48978","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-10-22T13:18:13.670064Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-10-22T13:18:44.244Z"}}]}}}