CVE-2021-47232·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: can: j1939: fix Use-after-Free, hold skb ref while in use This patch fixes a Use-after-Free found by the syzbot. The problem is that a skb is taken from the per-session skb queue, without incrementing the ref count. This leads to a Use-after-Free if the skb is taken concurrently from the session queue due to a CTS.
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.12.13
- Published
- 2024-05-21
Affected versions
From: 5.11
Until: 5.12.13
Fixed in: 5.12.13
How to fix this CVE
Update your Linux kernel to version 5.12.13 or later to resolve a use-after-free vulnerability in the CAN J1939 subsystem. The issue occurs when socket buffers are accessed concurrently without proper reference counting, potentially leading to kernel memory corruption. Apply the latest kernel patches immediately, especially if your system uses CAN bus functionality for automotive or industrial applications.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check installed kernel version with `uname -r` — vulnerable versions are 5.11.x through 5.12.12
- Step 2: Verify CAN J1939 module is loaded with `lsmod | grep j1939` — if present, the vulnerable code path is active
- Step 3: Search system logs for CAN-related crashes with `dmesg | grep -i 'can\|j1939\|use-after-free'` and check `/var/log/kern.log` for memory corruption warnings
- Step 4: After patching, confirm kernel version with `uname -r` returns 5.12.13 or later, then verify with `cat /proc/version`
FAQ
What is CVE-2021-47232?
This is a use-after-free vulnerability in the Linux kernel's CAN J1939 subsystem where socket buffers are accessed without proper reference counting, allowing concurrent operations to cause memory corruption and potential denial of service or code execution.
Is CVE-2021-47232 being actively exploited?
No, this vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog and no public exploits are currently available, though the vulnerability has high severity due to its memory safety implications.
What versions of Kernel are affected by CVE-2021-47232?
Linux kernel versions 5.11.0 through 5.12.12 are vulnerable; the fix was included starting in kernel 5.12.13 and backported to stable branches.
How do I check if my server is vulnerable to CVE-2021-47232?
Run `uname -r` to get your kernel version; if it reports 5.11.x or 5.12.x (up to 5.12.12), you are vulnerable. Then check if J1939 is in use with `lsmod | grep j1939`.
Does Defensia detect CVE-2021-47232?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2021-47232 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/1071065eeb33d32b7d98c2ce7591881ae7381705
- https://git.kernel.org/stable/c/2030043e616cab40f510299f09b636285e0a3678
- https://git.kernel.org/stable/c/22cba878abf646cd3a02ee7c8c2cef7afe66a256
- https://git.kernel.org/stable/c/509ab6bfdd0c76daebbad0f0af07da712116de22
- https://git.kernel.org/stable/c/1071065eeb33d32b7d98c2ce7591881ae7381705
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47232. Free for 1 server.
Get started free