CVE-2022-48978

Source
https://cve.org/CVERecord?id=CVE-2022-48978
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-48978.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-48978
Downstream
Related
Published
2024-10-21T20:05:57.079Z
Modified
2026-04-11T12:43:23.750282Z
Summary
HID: core: fix shift-out-of-bounds in hid_report_raw_event
Details

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

HID: core: fix shift-out-of-bounds in hidreportraw_event

Syzbot reported shift-out-of-bounds in hidreportraw_event.

microsoft 0003:045E:07DA.0001: hidfieldextract() 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> __dumpstack lib/dumpstack.c:88 [inline] dumpstacklvl+0x1e3/0x2cb lib/dumpstack.c:106 ubsanepilogue lib/ubsan.c:151 [inline] __ubsanhandleshiftoutofbounds+0x3a6/0x420 lib/ubsan.c:322 snto32 drivers/hid/hid-core.c:1323 [inline] hidinputfetchfield drivers/hid/hid-core.c:1572 [inline] hidprocessreport drivers/hid/hid-core.c:1665 [inline] hidreportrawevent+0xd56/0x18b0 drivers/hid/hid-core.c:1998 hidinputreport+0x408/0x4f0 drivers/hid/hid-core.c:2066 hidirq_in+0x459/0x690 drivers/hid/usbhid/hid-core.c:284 __usbhcdgivebackurb+0x369/0x530 drivers/usb/core/hcd.c:1671 dummytimer+0x86b/0x3110 drivers/usb/gadget/udc/dummyhcd.c:1988 calltimerfn+0xf5/0x210 kernel/time/timer.c:1474 expiretimers kernel/time/timer.c:1519 [inline] __runtimers+0x76a/0x980 kernel/time/timer.c:1790 runtimer_softirq+0x63/0xf0 kernel/time/timer.c:1803 __do_softirq+0x277/0x75b kernel/softirq.c:571 __irqexitrcu+0xec/0x170 kernel/softirq.c:650 irqexitrcu+0x5/0x20 kernel/softirq.c:662

sysvecapictimer_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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48978.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
dde5845a529ff753364a6d1aea61180946270bfa
Fixed
151493fe5a6ed1a88decc929a7368a3f2a246914
Fixed
809783f8b4b600c7fb3bccb10fefef822601ea3b
Fixed
8e14f20e12224ee2429f75a5c9418a700e26a8d3
Fixed
db1ed1b3fb4ec0d19080a102956255769bc45c79
Fixed
bc03f809da78fc79e4aee132d4e5c6a2b3aeec73
Fixed
f755d11c55b29049b77da5cd9ab2faae96eb33c3
Fixed
2b3b4d7aadaa1b6b58d0f34823bf86cfe8a31b4d
Fixed
ec61b41918587be530398b0d1c9a0d16619397e5

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-48978.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
2.6.20
Fixed
4.9.336
Type
ECOSYSTEM
Events
Introduced
4.10.0
Fixed
4.14.302
Type
ECOSYSTEM
Events
Introduced
4.15.0
Fixed
4.19.269
Type
ECOSYSTEM
Events
Introduced
4.20.0
Fixed
5.4.227
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.10.159
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.83
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.0.13

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-48978.json"