CVE-2026-31576
Last modified
CVE-2026-31576 is a high-severity vulnerability rated 7.8/10 on the CVSS scale. In the Linux kernel, the following vulnerability has been resolved: media: hackrf: fix to not free memory after the device is registered in hackrf_probe() In hackrf driver, the following race condition occurs: ``` CPU0 CPU1 hackrf_probe() kzalloc(); // alloc hackrf_dev .... v4l2_device_register(); .... fd = sys_open("/path/to/dev"); // open hackrf fd .... v4l2_device_unregister(); .... kfree(); // free hackrf_dev .... sys_ioctl(fd, ...); v4l2_ioctl(); video_is_registered() // UAF!! .... sys_close(fd); v4l2_release() // UAF!! hackrf_video_release() kfree(); // DFB!! ``` When a V4L2 or video device is unregistered, the device node is removed so new open() calls are blocked. However, file descriptors that are already open-and any in-flight I/O-do not terminate immediately; they remain valid until the last reference is dropped and the driver's release() is invoked. Therefore, freeing device memory on the error path after hackrf_probe() has registered dev it will lead to a race to use-after-free vuln, since those already-open handles haven't been released yet. And since release() free memory too, race to use-after-free and double-free vuln occur. To prevent this, if device is registered from probe(), it should be modified to free memory only through release() rather than calling kfree() directly.. EPSS estimates a 0.13% chance of exploitation in the next 30 days.
Description
In the Linux kernel, the following vulnerability has been resolved: media: hackrf: fix to not free memory after the device is registered in hackrf_probe() In hackrf driver, the following race condition occurs: ``` CPU0 CPU1 hackrf_probe() kzalloc(); // alloc hackrf_dev .... v4l2_device_register(); .... fd = sys_open("/path/to/dev"); // open hackrf fd .... v4l2_device_unregister(); .... kfree(); // free hackrf_dev .... sys_ioctl(fd, ...); v4l2_ioctl(); video_is_registered() // UAF!! .... sys_close(fd); v4l2_release() // UAF!! hackrf_video_release() kfree(); // DFB!! ``` When a V4L2 or video device is unregistered, the device node is removed so new open() calls are blocked. However, file descriptors that are already open-and any in-flight I/O-do not terminate immediately; they remain valid until the last reference is dropped and the driver's release() is invoked. Therefore, freeing device memory on the error path after hackrf_probe() has registered dev it will lead to a race to use-after-free vuln, since those already-open handles haven't been released yet. And since release() free memory too, race to use-after-free and double-free vuln occur. To prevent this, if device is registered from probe(), it should be modified to free memory only through release() rather than calling kfree() directly.
Metrics
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux Kernel | < 6.6.136 |
| Linux | Linux Kernel | >= 6.7, < 6.12.83 |
| Linux | Linux Kernel | >= 6.13, < 6.18.24 |
| Linux | Linux Kernel | >= 6.19, < 6.19.14 |
| Linux | Linux Kernel | >= 7.0, < 7.0.1 |
References
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2026-31576?
How severe is CVE-2026-31576?
How do I fix CVE-2026-31576?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-31570In the Linux kernel, the following vulnerability has been re…8.8
- CVE-2026-31571In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2026-31572In the Linux kernel, the following vulnerability has been re…4.7
- CVE-2026-31573In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2026-31574In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2026-31575In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2026-31577In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2026-31578In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2026-31579In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2026-3158IBM Sterling B2B Integrator 6.2.0.0 through 6.2.0.5_2, 6.2.1…4.3
- CVE-2026-31580In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2026-31581In the Linux kernel, the following vulnerability has been re…7.8
Are you affected by CVE-2026-31576?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
