# CVE-2026-31576: media: hackrf: fix to not free memory after the device is registered in hackrf\_probe()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.18% (percentile 5, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2026-04-24T14:42:08.188Z
- **Modified:** 2026-11-11T23:10:00.263Z

## Who should check

- Anyone running Linux \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 87b9685cca91ed715c39ba544715832d26a7f4b4; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 131ec9046e1c8af101aebdaec4e8095e05f3312b; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 67fd62e3efdc9dce01f76d95a745212f4feb38e6; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 45cbaf5c7cdc5386d86377f0daf94a17a007fed0; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 98a0a81ce78020c2522e0046f49d200de9778cb9; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 07e9e674b6146b1f6fc41b1f54b8968bf2802824; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 2145c71a8044362e82e9923f001ba2aeb771b848; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< fcd1d70792a35c8a97414fe429f48311e41269c2; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 3b7da2b4d0fe014eff181ed37e3bf832eb8ed258
- Anyone running Linux 4.4

## 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.

## Affected and fixed versions

- Linux: \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 87b9685cca91ed715c39ba544715832d26a7f4b4; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 131ec9046e1c8af101aebdaec4e8095e05f3312b; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 67fd62e3efdc9dce01f76d95a745212f4feb38e6; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 45cbaf5c7cdc5386d86377f0daf94a17a007fed0; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 98a0a81ce78020c2522e0046f49d200de9778cb9; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 07e9e674b6146b1f6fc41b1f54b8968bf2802824; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 2145c71a8044362e82e9923f001ba2aeb771b848; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< fcd1d70792a35c8a97414fe429f48311e41269c2; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 3b7da2b4d0fe014eff181ed37e3bf832eb8ed258 (cvelist)
- Linux: 4.4 (cvelist)

## Mitigation

- Upgrade Linux to 3b7da2b4d0fe014eff181ed37e3bf832eb8ed258 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-31576. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-31576.md
Affected: Linux >= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, < 87b9685cca91ed715c39ba544715832d26a7f4b4; >= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, < 131ec9046e1c8af101aebdaec4e8095e05f3312b; >= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, < 67fd62e3efdc9dce01f76d95a745212f4feb38e6; >= 8bc4a9ed85046c214458c9e…
Fixed in: Linux 87b9685cca91ed715c39ba544715832d26a7f4b4, Linux 131ec9046e1c8af101aebdaec4e8095e05f3312b, Linux 67fd62e3efdc9dce01f76d95a745212f4feb38e6, Linux 45cbaf5c7cdc5386d86377f0daf94a17a007fed0, Linux 98a0a81ce78020c2522e0046f49d200de9778cb9, Linux 07e9e674b6146b1f6fc41b1f54b8968bf2802824, Linux 2145c…

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-31576 being exploited?

There is no confirmed exploitation: CVE-2026-31576 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.18% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-31576?

High: CVSS 7.8 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-31576?

Linux \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 87b9685cca91ed715c39ba544715832d26a7f4b4; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 131ec9046e1c8af101aebdaec4e8095e05f3312b; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 67fd62e3efdc9dce01f76d95a745212f4feb38e6; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 45cbaf5c7cdc5386d86377f0daf94a17a007fed0; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 98a0a81ce78020c2522e0046f49d200de9778cb9; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 07e9e674b6146b1f6fc41b1f54b8968bf2802824; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 2145c71a8044362e82e9923f001ba2aeb771b848; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< fcd1d70792a35c8a97414fe429f48311e41269c2; \>= 8bc4a9ed85046c214458c9e82aea75d2f46cfffd, \< 3b7da2b4d0fe014eff181ed37e3bf832eb8ed258; Linux 4.4.

### Is there a fix for CVE-2026-31576?

Yes. Fixed in Linux 87b9685cca91ed715c39ba544715832d26a7f4b4, Linux 131ec9046e1c8af101aebdaec4e8095e05f3312b, Linux 67fd62e3efdc9dce01f76d95a745212f4feb38e6, Linux 45cbaf5c7cdc5386d86377f0daf94a17a007fed0, Linux 98a0a81ce78020c2522e0046f49d200de9778cb9, Linux 07e9e674b6146b1f6fc41b1f54b8968bf2802824, Linux 2145c71a8044362e82e9923f001ba2aeb771b848, Linux 3b7da2b4d0fe014eff181ed37e3bf832eb8ed258. Upgrade Linux to 3b7da2b4d0fe014eff181ed37e3bf832eb8ed258 or later.

### How do I check if I'm affected by CVE-2026-31576?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/45cbaf5c7cdc5386d86377f0daf94a17a007fed0>
- patch: <https://git.kernel.org/stable/c/98a0a81ce78020c2522e0046f49d200de9778cb9>
- patch: <https://git.kernel.org/stable/c/07e9e674b6146b1f6fc41b1f54b8968bf2802824>
- patch: <https://git.kernel.org/stable/c/2145c71a8044362e82e9923f001ba2aeb771b848>
- patch: <https://git.kernel.org/stable/c/fcd1d70792a35c8a97414fe429f48311e41269c2>
- patch: <https://git.kernel.org/stable/c/3b7da2b4d0fe014eff181ed37e3bf832eb8ed258>
- other: <https://git.kernel.org/stable/c/87b9685cca91ed715c39ba544715832d26a7f4b4>
- other: <https://git.kernel.org/stable/c/131ec9046e1c8af101aebdaec4e8095e05f3312b>
- other: <https://git.kernel.org/stable/c/67fd62e3efdc9dce01f76d95a745212f4feb38e6>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-31576>

HTML: <https://flawdb.com/CVE-2026-31576> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-31576>
