CVE-2021-47120 HID: magicmouse: fix NULL-deref on disconnect
A local attacker can cause a denial of service by triggering a null pointer dereference in the Linux kernel's Magic Mouse driver during device disconnection.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-47120?
CVE-2021-47120 is a medium-severity vulnerability in Linux kernel, published on 15 Mar 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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).
Weakness: CWE-476
Which versions are affected by CVE-2021-47120?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2021-47120?
Apply the vendor's patch.
Is CVE-2021-47120 being exploited?
There is no known exploitation of CVE-2021-47120 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2021-47120, GHSA-8v27-f4gj-22cx, UBUNTU-CVE-2021-47120.