HIGH Introduced in 2.6.37
hid DoubleReport Overflow
CVE-2026-80783
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: HID: magicmouse: prevent unbounded recursion in magicmouse_raw_event() magicmouse_raw_event() handles DOUBLE_REPORT_ID (0xf7) packets, which pack two touch reports into one, by splitting the packet and calling itself on each half. The only guard against runaway recursion is a "size < 1" check, which stops zero-sized calls but does not bound the recursion depth. A malicious HID device that matches this driver can send a report starting with DOUBLE_REPORT_ID and filled with the sequence [0xf7, 0x00]. Each level consumes two bytes and recurses on the remainder, so an incoming report of up to HID_MAX_BUFFER_SIZE (16 KiB) drives roughly 8000 nested calls. That easily exhausts the 16 KiB kernel stack, leading to a stack overflow: a panic with CONFIG_VMAP_STACK, or memory corruption without it. A double report only ever wraps two normal reports; it is never legitimately nested. Refuse to re-enter the DOUBLE_REPORT_ID case from a recursive call so the recursion depth is bounded to two, while all valid packets keep being parsed exactly as before.
02KernelScan AI Analysis
Risk summary
A malicious USB or Bluetooth HID device that matches the magicmouse driver can send crafted reports that trigger unbounded recursion in the kernel's HID event handler, exhausting the kernel stack. This causes a kernel panic (with VMAP_STACK) or memory corruption (without it), leading to denial of service or potential code execution. Physical access to plug in a USB device or Bluetooth proximity is required; no special privileges are needed.
Vulnerability analysis
The driver for certain Apple pointing devices processes combined touch reports by recursively handling each half, but it does not limit how deep that recursion can go. A malicious device that pretends to be one of these pointing devices can send a crafted report that forces thousands of recursive calls, exhausting the kernel stack. This leads to a system crash on some kernel configurations, or memory corruption on others. The fix caps the recursion so a report can only be split once, bounding the depth to two levels while preserving normal behavior for legitimate devices. An attacker must connect a malicious device that mimics a supported pointing device, either through a USB port or over Bluetooth; no account or special permissions on the target system are required.
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.15 | 2.6.37 | 5.15.220 | 26c45abed625 |
| 6.1 | 2.6.37 | 6.1.187 | 8a10a624996f |
| 6.6 | 2.6.37 | 6.6.156 | d16df755b449 |
| 6.12 | 2.6.37 | 6.12.108 | bec338b07beb |
| 6.18 | 2.6.37 | 6.18.49 | 70589b0c005d |
| 7.1 | 2.6.37 | 7.1.11 | a33a596d3ad8 |
| 7.2 | 2.6.37 | 7.2.1 | d095de37f78c |
| mainline | 2.6.37 | 7.3-rc1 | db8d634128d2 |