CVE-2025-40292

Source
https://cve.org/CVERecord?id=CVE-2025-40292
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40292.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-40292
Downstream
Related
Published
2025-12-08T00:46:15.761Z
Modified
2026-03-20T12:43:15.163797Z
Summary
virtio-net: fix received length check in big packets
Details

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

virtio-net: fix received length check in big packets

Since commit 4959aebba8c0 ("virtio-net: use mtu size as buffer length for big packets"), when guest gso is off, the allocated size for big packets is not MAXSKBFRAGS * PAGESIZE anymore but depends on negotiated MTU. The number of allocated frags for big packets is stored in vi->bigpacketsnumskbfrags.

Because the host announced buffer length can be malicious (e.g. the host vhostnet driver's getrxbufs is modified to announce incorrect length), we need a check in virtionet receive path. Currently, the check is not adapted to the new change which can lead to NULL page pointer dereference in the below while loop when receiving length that is larger than the allocated one.

This commit fixes the received length check corresponding to the new change.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40292.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
4959aebba8c06992abafa09d1e80965e0825af54
Fixed
82f9028e83944a9eee5229cbc6fee9be1de8a62d
Fixed
946dec89c41726b94d31147ec528b96af0be1b5a
Fixed
82fe78065450d2d07f36a22e2b6b44955cf5ca5b
Fixed
3e9d89f2ecd3636bd4cbdfd0b2dfdaf58f9882e2
Fixed
0c716703965ffc5ef4311b65cb5d84a703784717

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40292.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.1.0
Fixed
6.1.159
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.117
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.58
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.17.8

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40292.json"