CVE-2021-47040·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: io_uring: fix overflows checks in provide buffers Colin reported before possible overflow and sign extension problems in io_provide_buffers_prep(). As Linus pointed out previous attempt did nothing useful, see d81269fecb8ce ("io_uring: fix provide_buffers sign extension"). Do that with help of check_<op>_overflow helpers. And fix struct io_provide_buf::len type, as it doesn't make much sense to keep it signed.
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.12.4
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at <0.1% — higher than 5% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2021-47040 scores 7.8 on CVSS, so a successful attack would be serious — but at <0.1%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
From: 5.12
Until: 5.12.4
Fixed in: 5.12.4
How to fix this CVE
Update your Linux kernel to version 5.12.4 or later to address an integer overflow vulnerability in the io_uring subsystem's buffer provision handler. This vulnerability allows local processes with limited privileges to cause kernel memory corruption or potential privilege escalation through malformed buffer provision requests. Apply the kernel update through your distribution's package manager and reboot your system.
sudo dnf update kernel kernel-devel && sudo rebootDefensia detects this vulnerability
How to check if you are affected
- Check kernel version: uname -r — verify version is 5.12.4 or later; versions 5.12.0 through 5.12.3 are vulnerable
- Verify io_uring module status: lsmod | grep io_uring — confirm if the vulnerable subsystem is loaded on your system
- Review kernel build config: grep CONFIG_IO_URING /boot/config-$(uname -r) — check if io_uring support is enabled (y/m indicates potential exposure)
- Confirm patch applied: grep -i 'check_.*_overflow' /usr/src/linux-headers-$(uname -r)/fs/io_uring.c — verify overflow validation helpers are present after update
FAQ
What is CVE-2021-47040?
CVE-2021-47040 is an integer overflow vulnerability in the Linux kernel's io_uring buffer provision function that allows local authenticated attackers to corrupt kernel memory and potentially escalate privileges. The vulnerability stems from insufficient bounds checking when validating buffer allocation parameters.
Is CVE-2021-47040 being actively exploited?
No, CVE-2021-47040 is not listed in CISA's Known Exploited Vulnerabilities catalog and no public exploits have been released. However, the vulnerability requires only local access with standard user privileges, making it a realistic attack vector in multi-user environments.
What versions of Kernel are affected by CVE-2021-47040?
Linux kernel versions 5.12.0 through 5.12.3 are vulnerable. Version 5.12.4 and all later 5.12.x releases contain the fix.
How do I check if my server is vulnerable to CVE-2021-47040?
Run 'uname -r' to see your kernel version. If output shows 5.12.0, 5.12.1, 5.12.2, or 5.12.3, your system is vulnerable. Additionally run 'lsmod | grep io_uring' to confirm the subsystem is active.
Does Defensia detect CVE-2021-47040?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2021-47040 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/38134ada0ceea3e848fe993263c0ff6207fd46e7
- https://git.kernel.org/stable/c/51bf90901952aaac564bbdb36b2b503050c53dd9
- https://git.kernel.org/stable/c/84b8c266c4bfe9ed5128e13253c388deb74b1b03
- https://git.kernel.org/stable/c/cbbc13b115b8f18e0a714d89f87fbdc499acfe2d
- https://git.kernel.org/stable/c/38134ada0ceea3e848fe993263c0ff6207fd46e7
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47040. Free for 1 server.
Get started free