media: videobuf2: forbid remove_bufs when legacy fileio is active
In the Linux kernel, the following vulnerability has been resolved: media: videobuf2: forbid remove_bufs when legacy fileio is active vb2_ioctl_remove_bufs() call manipulates queue internal buffer list, potentially overwriting some pointers used by the legacy fileio access mode. Forbid that ioctl when fileio is active to protect internal queue state between subsequent read/write calls.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.12.58, 6.17.8
- CVEs
- CVE-2025-40302
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 16:12 UTC · Revision 1
Source evidence
media: videobuf2: forbid remove_bufs when legacy fileio is active
core-osv · Original sourcePublished 8 Dec 2025, 00:46 UTC
In the Linux kernel, the following vulnerability has been resolved: media: videobuf2: forbid remove_bufs when legacy fileio is active vb2_ioctl_remove_bufs() call manipulates queue internal buffer list, potentially overwriting some pointers used by the legacy fileio access mode. Forbid that ioctl when fileio is active to protect internal queue state between subsequent read/write calls.
osv:CVE-2025-40302
Kernel
Fixed versions: 6.12.58, 6.17.8
Complete source record
{
"id": "eefa39ce5cfd2439f29e4d26efc729884b1c218ef5735431fe98ab3590ae99d9",
"url": "https://osv.dev/vulnerability/CVE-2025-40302",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "media: videobuf2: forbid remove_bufs when legacy fileio is active",
"summary": "In the Linux kernel, the following vulnerability has been resolved: media: videobuf2: forbid remove_bufs when legacy fileio is active vb2_ioctl_remove_bufs() call manipulates queue internal buffer list, potentially overwriting some pointers used by the legacy fileio access mode. Forbid that ioctl when fileio is active to protect internal queue state between subsequent read/write calls.",
"evidence": "osv:CVE-2025-40302",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.12.58",
"evidence": "/affected/1/ranges"
},
{
"value": "6.17.8",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2025-40302",
"aliases": [
"CVE-2025-40302"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "a3293a85381ec9680aa2929547fbc76c5d87a1b2"
},
{
"fixed": "a6a493b985bfffac097a4e1be09f98b27729dca8"
},
{
"fixed": "e819b34df0a7030a15c968d619fa8a3ed2455c7a"
},
{
"fixed": "27afd6e066cfd80ddbe22a4a11b99174ac89cced"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40302.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.10.0"
},
{
"fixed": "6.12.58"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.17.8"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40302.json"
}
}
],
"modified": "2026-10-28T02:30:37.385519061Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/27afd6e066cfd80ddbe22a4a11b99174ac89cced",
"https://git.kernel.org/stable/c/a6a493b985bfffac097a4e1be09f98b27729dca8",
"https://git.kernel.org/stable/c/e819b34df0a7030a15c968d619fa8a3ed2455c7a",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40302.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-40302",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40302.json"
}
},
"related_cves": [
{
"value": "CVE-2025-40302",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 504521,
"published_at": "2025-12-08T00:46:26.293+00:00"
}