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

HID: magicmouse: do not keep a stale msc->input if no input is claimed

magicmouse_input_mapping() caches the first hid_input's input_dev in
msc->input while the report descriptor is parsed, and the rest of the
driver treats a non-NULL msc->input as proof that an input device was
registered.

That does not hold on the hid-input error path. If hidinput_connect()
fails -- for instance because input_register_device() returns an error --
it unwinds through hidinput_disconnect(), which frees every input_dev it
created, including the one cached in msc->input.

The failure does not abort the probe. hid_connect() only skips the claim:

if ((connect_mask & HID_CONNECT_HIDINPUT) && !hidinput_connect(hdev,
connect_mask & HID_CONNECT_HIDINPUT_FORCE))
hdev->claimed |= HID_CLAIMED_INPUT;

and the "device has no listeners" bailout below it does not fire for this
driver, which sets ->raw_event; on the USB Magic Mouse 2 / Magic Trackpad
2 paths hidraw and hiddev are claimed as well. hid_hw_start() therefore
returns 0 and magicmouse_probe() continues with msc->input pointing at
freed memory. Being non-NULL, it passes the "input not registered" check
in probe and the NULL checks in ->raw_event and ->event, so the next
input report dereferences freed memory.

Clear msc->input when the HID core did not claim an input device, so the
existing NULL checks cover this case as well.
Published: 2026-09-04
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

In the Linux kernel's magicmouse HID driver, the device input descriptor is cached during parsing and later used as proof that an input device was registered. If the underlying hid‑input connection fails, the cached input device pointer is freed but the driver still believes it is valid. Subsequent input reports dereference this freed memory, creating a use‑after‑free condition that can lead to memory corruption, kernel panic or other uncontrolled behavior. The vulnerability stems from inadequate null checking and stale pointer retention after a failed input connection.

Affected Systems

All Linux kernel builds that contain the magicmouse HID driver are affected, as the kernel version information is not specified in the advisory. The issue is present in any Linux kernel that has not been patched to clear the stale msc->input pointer after a failed hid‑input connection.

Risk and Exploitability

The CVSS score is not provided and EPSS is unavailable, so the quantified risk level cannot be rigorously determined. The vulnerability remains in the kernel’s code paths that process input reports from devices such as the USB Magic Mouse 2 or Magic Trackpad 2, which could be accessed by an attacker using a malicious USB or Bluetooth HID device. The lack of a sanitizing null check and the potential for memory corruption give this flaw a non‑negligible risk of exploitation, but the absence of a public exploit and no listing in CISA’s KEV catalog suggest that the current threat level may be moderate until a proof‑of‑concept is discovered.

Generated by OpenCVE AI on September 4, 2026 at 17:49 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that includes the patch fixing the stale msc->input pointer issue
  • Apply udev rules that restrict access to HID devices that are not required by the system, reducing the attack surface for malicious input devices
  • Monitor system logs for kernel panic or BUG messages related to magicmouse or HID devices and investigate promptly

Generated by OpenCVE AI on September 4, 2026 at 17:49 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 04 Sep 2026 18:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Fri, 04 Sep 2026 15:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: HID: magicmouse: do not keep a stale msc->input if no input is claimed magicmouse_input_mapping() caches the first hid_input's input_dev in msc->input while the report descriptor is parsed, and the rest of the driver treats a non-NULL msc->input as proof that an input device was registered. That does not hold on the hid-input error path. If hidinput_connect() fails -- for instance because input_register_device() returns an error -- it unwinds through hidinput_disconnect(), which frees every input_dev it created, including the one cached in msc->input. The failure does not abort the probe. hid_connect() only skips the claim: if ((connect_mask & HID_CONNECT_HIDINPUT) && !hidinput_connect(hdev, connect_mask & HID_CONNECT_HIDINPUT_FORCE)) hdev->claimed |= HID_CLAIMED_INPUT; and the "device has no listeners" bailout below it does not fire for this driver, which sets ->raw_event; on the USB Magic Mouse 2 / Magic Trackpad 2 paths hidraw and hiddev are claimed as well. hid_hw_start() therefore returns 0 and magicmouse_probe() continues with msc->input pointing at freed memory. Being non-NULL, it passes the "input not registered" check in probe and the NULL checks in ->raw_event and ->event, so the next input report dereferences freed memory. Clear msc->input when the HID core did not claim an input device, so the existing NULL checks cover this case as well.
Title HID: magicmouse: do not keep a stale msc->input if no input is claimed
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-09-04T15:12:53.933Z

Reserved: 2026-08-26T14:34:25.792Z

Link: CVE-2026-80782

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-04T16:18:04.030

Modified: 2026-09-04T16:18:04.030

Link: CVE-2026-80782

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-04T18:00:04Z

Weaknesses