usb: gadget: f_rndis: Refactor bind path to use __free()
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_rndis: Refactor bind path to use __free() After an bind/unbind cycle, the rndis->notify_req is left stale. If a subsequent bind fails, the unified error label attempts to free this stale request, leading to a NULL pointer dereference when accessing ep->ops->free_request. Refactor the error handling in the bind path to use the __free() automatic cleanup mechanism.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.1.158, 6.12.55, 6.17.5, 6.6.114
- CVEs
- CVE-2025-40095
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 2 Nov 2026, 16:43 UTC · Revision 1
Source evidence
usb: gadget: f_rndis: Refactor bind path to use __free()
core-osv · Original sourcePublished 30 Oct 2025, 09:48 UTC
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_rndis: Refactor bind path to use __free() After an bind/unbind cycle, the rndis->notify_req is left stale. If a subsequent bind fails, the unified error label attempts to free this stale request, leading to a NULL pointer dereference when accessing ep->ops->free_request. Refactor the error handling in the bind path to use the __free() automatic cleanup mechanism.
osv:CVE-2025-40095
Kernel
Fixed versions: 6.1.158, 6.6.114, 6.12.55, 6.17.5
Complete source record
{
"id": "d66bec2af04e19a22d87ec7f0c45444855f5b465320b22c2f474787aa3d681d9",
"url": "https://osv.dev/vulnerability/CVE-2025-40095",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "usb: gadget: f_rndis: Refactor bind path to use __free()",
"summary": "In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_rndis: Refactor bind path to use __free() After an bind/unbind cycle, the rndis->notify_req is left stale. If a subsequent bind fails, the unified error label attempts to free this stale request, leading to a NULL pointer dereference when accessing ep->ops->free_request. Refactor the error handling in the bind path to use the __free() automatic cleanup mechanism.",
"evidence": "osv:CVE-2025-40095",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.1.158",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.114",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.55",
"evidence": "/affected/1/ranges"
},
{
"value": "6.17.5",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2025-40095",
"aliases": [
"CVE-2025-40095"
],
"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": "45fe3b8e5342cd1ce307099459c74011d8e01986"
},
{
"fixed": "ef81226bb1f8b6e761cd0b53d2696e9c1bc955d1"
},
{
"fixed": "5f65c8ad8c7292ed7e3716343fcd590a51818cc3"
},
{
"fixed": "380353c3a92be7d928e6f973bd065c5b79755ac3"
},
{
"fixed": "a8366263b7e5b663d7fb489d3a9ba1e2600049a6"
},
{
"fixed": "08228941436047bdcd35a612c1aec0912a29d8cd"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40095.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "2.6.27"
},
{
"fixed": "6.1.158"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.114"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.55"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.17.5"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40095.json"
}
}
],
"modified": "2026-10-28T02:30:21.052063023Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/08228941436047bdcd35a612c1aec0912a29d8cd",
"https://git.kernel.org/stable/c/380353c3a92be7d928e6f973bd065c5b79755ac3",
"https://git.kernel.org/stable/c/5f65c8ad8c7292ed7e3716343fcd590a51818cc3",
"https://git.kernel.org/stable/c/a8366263b7e5b663d7fb489d3a9ba1e2600049a6",
"https://git.kernel.org/stable/c/ef81226bb1f8b6e761cd0b53d2696e9c1bc955d1",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40095.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-40095",
"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-40095.json"
}
},
"related_cves": [
{
"value": "CVE-2025-40095",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 487329,
"published_at": "2025-10-30T09:48:03.276+00:00"
}