CVE-2021-47143 net/smc: remove device from smcd_dev_list after failed device_add()
A use-after-free vulnerability in the Linux kernel's SMC protocol allows attackers to cause a denial of service or potentially execute code via corrupted list handling.
- 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-47143?
CVE-2021-47143 is a medium-severity use after free vulnerability in Linux kernel, published on 25 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:
net/smc: remove device from smcd_dev_list after failed device_add()
If the device_add() for a smcd_dev fails, there's no cleanup step that rolls back the earlier list_add(). The device subsequently gets freed, and we end up with a corrupted list.
Add some error handling that removes the device from the list.
Weakness: CWE-459
Which versions are affected by CVE-2021-47143?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2021-47143?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2021-47143 being exploited?
There is no known exploitation of CVE-2021-47143 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2021-47143, GHSA-fxx6-99pg-x743, UBUNTU-CVE-2021-47143.