# CVE-2025-38413: virtio-net: xsk: rx: fix the frame's length check

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

- **Severity:** HIGH 7.7
- **CVSS:** 7.7 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; 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.27% (percentile 12, 2026-11-26)
- **Published:** 2025-07-25T13:20:17.394Z
- **Modified:** 2026-08-05T12:01:42.803Z

## Who should check

- Anyone running Linux \>= a4e7ba7027012f009f22a68bcfde670f9298d3a4, \< 892f6ed9a4a38bb3360fdff091b9241cfa105b61; \>= a4e7ba7027012f009f22a68bcfde670f9298d3a4, \< 6013bb6bc24c2cac3f45b37a15b71b232a5b00ff; \>= a4e7ba7027012f009f22a68bcfde670f9298d3a4, \< 5177373c31318c3c6a190383bfd232e6cf565c36
- Anyone running Linux 6.11

## Description

In the Linux kernel, the following vulnerability has been resolved:

virtio-net: xsk: rx: fix the frame's length check

When calling buf\_to\_xdp, the len argument is the frame data's length
without virtio header's length (vi-\>hdr\_len). We check that len with

	xsk\_pool\_get\_rx\_frame\_size() + vi-\>hdr\_len

to ensure the provided len does not larger than the allocated chunk
size. The additional vi-\>hdr\_len is because in virtnet\_add\_recvbuf\_xsk,
we use part of XDP\_PACKET\_HEADROOM for virtio header and ask the vhost
to start placing data from

	hard\_start + XDP\_PACKET\_HEADROOM - vi-\>hdr\_len
not
	hard\_start + XDP\_PACKET\_HEADROOM

But the first buffer has virtio\_header, so the maximum frame's length in
the first buffer can only be

	xsk\_pool\_get\_rx\_frame\_size()
not
	xsk\_pool\_get\_rx\_frame\_size() + vi-\>hdr\_len

like in the current check.

This commit adds an additional argument to buf\_to\_xdp differentiate
between the first buffer and other ones to correctly calculate the maximum
frame's length.

## Affected and fixed versions

- Linux: \>= a4e7ba7027012f009f22a68bcfde670f9298d3a4, \< 892f6ed9a4a38bb3360fdff091b9241cfa105b61; \>= a4e7ba7027012f009f22a68bcfde670f9298d3a4, \< 6013bb6bc24c2cac3f45b37a15b71b232a5b00ff; \>= a4e7ba7027012f009f22a68bcfde670f9298d3a4, \< 5177373c31318c3c6a190383bfd232e6cf565c36 (cvelist)
- Linux: 6.11 (cvelist)

## Mitigation

- Upgrade Linux to 5177373c31318c3c6a190383bfd232e6cf565c36 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-38413.md
Affected: Linux >= a4e7ba7027012f009f22a68bcfde670f9298d3a4, < 892f6ed9a4a38bb3360fdff091b9241cfa105b61; >= a4e7ba7027012f009f22a68bcfde670f9298d3a4, < 6013bb6bc24c2cac3f45b37a15b71b232a5b00ff; >= a4e7ba7027012f009f22a68bcfde670f9298d3a4, < 5177373c31318c3c6a190383bfd232e6cf565c36; Linux 6.11
Fixed in: Linux 892f6ed9a4a38bb3360fdff091b9241cfa105b61, Linux 6013bb6bc24c2cac3f45b37a15b71b232a5b00ff, Linux 5177373c31318c3c6a190383bfd232e6cf565c36

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-2025-38413 being exploited?

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

### How serious is CVE-2025-38413?

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

### Which versions are affected by CVE-2025-38413?

Linux \>= a4e7ba7027012f009f22a68bcfde670f9298d3a4, \< 892f6ed9a4a38bb3360fdff091b9241cfa105b61; \>= a4e7ba7027012f009f22a68bcfde670f9298d3a4, \< 6013bb6bc24c2cac3f45b37a15b71b232a5b00ff; \>= a4e7ba7027012f009f22a68bcfde670f9298d3a4, \< 5177373c31318c3c6a190383bfd232e6cf565c36; Linux 6.11.

### Is there a fix for CVE-2025-38413?

Yes. Fixed in Linux 892f6ed9a4a38bb3360fdff091b9241cfa105b61, Linux 6013bb6bc24c2cac3f45b37a15b71b232a5b00ff, Linux 5177373c31318c3c6a190383bfd232e6cf565c36. Upgrade Linux to 5177373c31318c3c6a190383bfd232e6cf565c36 or later.

### How do I check if I'm affected by CVE-2025-38413?

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/892f6ed9a4a38bb3360fdff091b9241cfa105b61>
- patch: <https://git.kernel.org/stable/c/6013bb6bc24c2cac3f45b37a15b71b232a5b00ff>
- patch: <https://git.kernel.org/stable/c/5177373c31318c3c6a190383bfd232e6cf565c36>

## 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-2025-38413>

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