What’s Vulnerable › Vulnerabilities
CVE-2021-47120: HID: magicmouse: fix NULL-deref on disconnect
- Severity: medium (CVSS 5.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-03-15 · updated 2026-06-17
- Weakness: CWE-476
Description
In the Linux kernel, the following vulnerability has been resolved: HID: magicmouse: fix NULL-deref on disconnect Commit 9d7b18668956 ("HID: magicmouse: add support for Apple Magic Trackpad 2") added a sanity check for an Apple trackpad but returned success instead of -ENODEV when the check failed. This means that the remove callback will dereference the never-initialised driver data pointer when the driver is later unbound (e.g. on USB disconnect).
Affected products
- Linux kernel: from 4.20 before 5.4.125; from 5.5 before 5.10.43; from 5.11 before 5.12.10; 5.13-rc1, 5.13-rc2, 5.13-rc3, 5.13-rc4 — fixed in 5.10.43, 5.12.10, 5.4.125
How to fix
Upgrade to a fixed version: Linux kernel 5.10.43, 5.12.10, 5.4.125. Check the vendor advisory for mitigations.
References
- https://git.kernel.org/stable/c/368c5d45a87e1bcc7f1e98e0c255c37b7b12c5d6
- https://git.kernel.org/stable/c/4b4f6cecca446abcb686c6e6c451d4f1ec1a7497
- https://git.kernel.org/stable/c/9cf27473f21913a3eaf4702dd2a25415afd5f33f
- https://git.kernel.org/stable/c/b5d013c4c76b276890135b5d32803c4c63924b77
- https://git.kernel.org/stable/c/368c5d45a87e1bcc7f1e98e0c255c37b7b12c5d6
- https://git.kernel.org/stable/c/4b4f6cecca446abcb686c6e6c451d4f1ec1a7497
- https://git.kernel.org/stable/c/9cf27473f21913a3eaf4702dd2a25415afd5f33f
- https://git.kernel.org/stable/c/b5d013c4c76b276890135b5d32803c4c63924b77
Get alerted when CVE-2021-47120 or the next vulnerability affects your stack