# CVE-2022-48978: HID: core: fix shift-out-of-bounds in hid\_report\_raw\_event

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.30% (percentile 15, 2026-11-26)
- **Published:** 2024-10-21T20:05:57.079Z
- **Modified:** 2026-06-17T05:16:45.777Z

## Who should check

- Anyone running Linux \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 151493fe5a6ed1a88decc929a7368a3f2a246914; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 809783f8b4b600c7fb3bccb10fefef822601ea3b; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 8e14f20e12224ee2429f75a5c9418a700e26a8d3; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< db1ed1b3fb4ec0d19080a102956255769bc45c79; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< bc03f809da78fc79e4aee132d4e5c6a2b3aeec73; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< f755d11c55b29049b77da5cd9ab2faae96eb33c3; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 2b3b4d7aadaa1b6b58d0f34823bf86cfe8a31b4d; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< ec61b41918587be530398b0d1c9a0d16619397e5
- Anyone running Linux 2.6.20

## Description

In the Linux kernel, the following vulnerability has been resolved:

HID: core: fix shift-out-of-bounds in hid\_report\_raw\_event

Syzbot reported shift-out-of-bounds in hid\_report\_raw\_event.

microsoft 0003:045E:07DA.0001: hid\_field\_extract() called with n (128) \>
32! (swapper/0)
======================================================================
UBSAN: shift-out-of-bounds in drivers/hid/hid-core.c:1323:20
shift exponent 127 is too large for 32-bit type 'int'
CPU: 0 PID: 0 Comm: swapper/0 Not tainted
6.1.0-rc4-syzkaller-00159-g4bbf3422df78 \#0
Hardware name: Google Compute Engine/Google Compute Engine, BIOS
Google 10/26/2022
Call Trace:
 \<IRQ\>
 \_\_dump\_stack lib/dump\_stack.c:88 \[inline\]
 dump\_stack\_lvl+0x1e3/0x2cb lib/dump\_stack.c:106
 ubsan\_epilogue lib/ubsan.c:151 \[inline\]
 \_\_ubsan\_handle\_shift\_out\_of\_bounds+0x3a6/0x420 lib/ubsan.c:322
 snto32 drivers/hid/hid-core.c:1323 \[inline\]
 hid\_input\_fetch\_field drivers/hid/hid-core.c:1572 \[inline\]
 hid\_process\_report drivers/hid/hid-core.c:1665 \[inline\]
 hid\_report\_raw\_event+0xd56/0x18b0 drivers/hid/hid-core.c:1998
 hid\_input\_report+0x408/0x4f0 drivers/hid/hid-core.c:2066
 hid\_irq\_in+0x459/0x690 drivers/hid/usbhid/hid-core.c:284
 \_\_usb\_hcd\_giveback\_urb+0x369/0x530 drivers/usb/core/hcd.c:1671
 dummy\_timer+0x86b/0x3110 drivers/usb/gadget/udc/dummy\_hcd.c:1988
 call\_timer\_fn+0xf5/0x210 kernel/time/timer.c:1474
 expire\_timers kernel/time/timer.c:1519 \[inline\]
 \_\_run\_timers+0x76a/0x980 kernel/time/timer.c:1790
 run\_timer\_softirq+0x63/0xf0 kernel/time/timer.c:1803
 \_\_do\_softirq+0x277/0x75b kernel/softirq.c:571
 \_\_irq\_exit\_rcu+0xec/0x170 kernel/softirq.c:650
 irq\_exit\_rcu+0x5/0x20 kernel/softirq.c:662
 sysvec\_apic\_timer\_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1107
======================================================================

If the size of the integer (unsigned n) is bigger than 32 in snto32(),
shift exponent will be too large for 32-bit type 'int', resulting in a
shift-out-of-bounds bug.
Fix this by adding a check on the size of the integer (unsigned n) in
snto32(). To add support for n greater than 32 bits, set n to 32, if n
is greater than 32.

## Affected and fixed versions

- Linux: \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 151493fe5a6ed1a88decc929a7368a3f2a246914; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 809783f8b4b600c7fb3bccb10fefef822601ea3b; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 8e14f20e12224ee2429f75a5c9418a700e26a8d3; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< db1ed1b3fb4ec0d19080a102956255769bc45c79; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< bc03f809da78fc79e4aee132d4e5c6a2b3aeec73; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< f755d11c55b29049b77da5cd9ab2faae96eb33c3; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 2b3b4d7aadaa1b6b58d0f34823bf86cfe8a31b4d; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< ec61b41918587be530398b0d1c9a0d16619397e5 (cvelist)
- Linux: 2.6.20 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-48978. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-48978.md
Affected: Linux >= dde5845a529ff753364a6d1aea61180946270bfa, < 151493fe5a6ed1a88decc929a7368a3f2a246914; >= dde5845a529ff753364a6d1aea61180946270bfa, < 809783f8b4b600c7fb3bccb10fefef822601ea3b; >= dde5845a529ff753364a6d1aea61180946270bfa, < 8e14f20e12224ee2429f75a5c9418a700e26a8d3; >= dde5845a529ff753364a6d1…
Fixed in: Linux 151493fe5a6ed1a88decc929a7368a3f2a246914, Linux 809783f8b4b600c7fb3bccb10fefef822601ea3b, Linux 8e14f20e12224ee2429f75a5c9418a700e26a8d3, Linux 2b3b4d7aadaa1b6b58d0f34823bf86cfe8a31b4d

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-48978 being exploited?

There is no confirmed exploitation: CVE-2022-48978 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-48978?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-48978?

Linux \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 151493fe5a6ed1a88decc929a7368a3f2a246914; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 809783f8b4b600c7fb3bccb10fefef822601ea3b; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 8e14f20e12224ee2429f75a5c9418a700e26a8d3; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< db1ed1b3fb4ec0d19080a102956255769bc45c79; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< bc03f809da78fc79e4aee132d4e5c6a2b3aeec73; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< f755d11c55b29049b77da5cd9ab2faae96eb33c3; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< 2b3b4d7aadaa1b6b58d0f34823bf86cfe8a31b4d; \>= dde5845a529ff753364a6d1aea61180946270bfa, \< ec61b41918587be530398b0d1c9a0d16619397e5; Linux 2.6.20.

### Is there a fix for CVE-2022-48978?

Yes. Fixed in Linux 151493fe5a6ed1a88decc929a7368a3f2a246914, Linux 809783f8b4b600c7fb3bccb10fefef822601ea3b, Linux 8e14f20e12224ee2429f75a5c9418a700e26a8d3, Linux 2b3b4d7aadaa1b6b58d0f34823bf86cfe8a31b4d. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-48978?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/151493fe5a6ed1a88decc929a7368a3f2a246914>
- patch: <https://git.kernel.org/stable/c/809783f8b4b600c7fb3bccb10fefef822601ea3b>
- patch: <https://git.kernel.org/stable/c/8e14f20e12224ee2429f75a5c9418a700e26a8d3>
- patch: <https://git.kernel.org/stable/c/db1ed1b3fb4ec0d19080a102956255769bc45c79>
- patch: <https://git.kernel.org/stable/c/bc03f809da78fc79e4aee132d4e5c6a2b3aeec73>
- patch: <https://git.kernel.org/stable/c/f755d11c55b29049b77da5cd9ab2faae96eb33c3>
- patch: <https://git.kernel.org/stable/c/2b3b4d7aadaa1b6b58d0f34823bf86cfe8a31b4d>
- patch: <https://git.kernel.org/stable/c/ec61b41918587be530398b0d1c9a0d16619397e5>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-48978>

HTML: <https://flawdb.com/CVE-2022-48978> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-48978>
