# CVE-2021-47120: HID: magicmouse: fix NULL-deref on disconnect

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 15% of CVEs (2026-12-01)
- Published: 2024-03-15T20:14:26.578Z
- Modified: 2026-06-17T04:16:32.793Z
- Weaknesses: CWE-476
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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).

(As written by CVE List.)

## Affected

- Linux Linux: from 9d7b18668956c411a422d04c712994c5fdb23a4b before 368c5d45a87e1bcc7f1e98e0c255c37b7b12c5d6; from 9d7b18668956c411a422d04c712994c5fdb23a4b before b5d013c4c76b276890135b5d32803c4c63924b77; from 9d7b18668956c411a422d04c712994c5fdb23a4b before 9cf27473f21913a3eaf4702dd2a25415afd5f33f; from 9d7b18668956c411a422d04c712994c5fdb23a4b before 4b4f6cecca446abcb686c6e6c451d4f1ec1a7497; 4.20 (not affected: before 4.20; from 5.4.125 up to 5.4.*; from 5.10.43 up to 5.10.*; from 5.12.10 up to 5.12.*; from 5.13 up to *)
- linux 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

## References

- <https://git.kernel.org/stable/c/368c5d45a87e1bcc7f1e98e0c255c37b7b12c5d6> (patch)
- <https://git.kernel.org/stable/c/b5d013c4c76b276890135b5d32803c4c63924b77> (patch)
- <https://git.kernel.org/stable/c/9cf27473f21913a3eaf4702dd2a25415afd5f33f> (patch)
- <https://git.kernel.org/stable/c/4b4f6cecca446abcb686c6e6c451d4f1ec1a7497> (patch)

## Sources

- CVE List: [CVE-2021-47120](https://www.cve.org/CVERecord?id=CVE-2021-47120), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2021-47120](https://nvd.nist.gov/vuln/detail/CVE-2021-47120), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-47120 · Whole record: https://cve.day/CVE-2021-47120.json · Rebuilt by cve.day 2026-11-25T22:58:08.671Z
