of: unittest: fix use-after-free in testdrv_probe()
In the Linux kernel, the following vulnerability has been resolved: of: unittest: fix use-after-free in testdrv_probe() The function testdrv_probe() retrieves the device_node from the PCI device, applies an overlay, and then immediately calls of_node_put(dn). This releases the reference held by the PCI core, potentially freeing the node if the reference count drops to zero. Later, the same freed pointer 'dn' is passed to of_platform_default_populate(), leading to a use-after-free. The reference to pdev->dev.of_node is owned by the device model and should not be released by the driver. Remove the erroneous of_node_put() to prevent premature freeing.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.12.86, 6.18.27, 6.6.140, 7.0.4
- CVEs
- CVE-2026-45989
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 08:10 UTC · Revision 1
Source evidence
of: unittest: fix use-after-free in testdrv_probe()
core-osv · Original sourcePublished 27 May 2026, 12:55 UTC
In the Linux kernel, the following vulnerability has been resolved: of: unittest: fix use-after-free in testdrv_probe() The function testdrv_probe() retrieves the device_node from the PCI device, applies an overlay, and then immediately calls of_node_put(dn). This releases the reference held by the PCI core, potentially freeing the node if the reference count drops to zero. Later, the same freed pointer 'dn' is passed to of_platform_default_populate(), leading to a use-after-free. The reference to pdev->dev.of_node is owned by the device model and should not be released by the driver. Remove the erroneous of_node_put() to prevent premature freeing.
osv:CVE-2026-45989
Kernel
Fixed versions: 6.6.140, 6.12.86, 6.18.27, 7.0.4
Complete source record
{
"id": "9bc3c2d570d9b09ca96e58c533ccff9036af0596f1d921ae0eef9d39a2702f76",
"url": "https://osv.dev/vulnerability/CVE-2026-45989",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "of: unittest: fix use-after-free in testdrv_probe()",
"summary": "In the Linux kernel, the following vulnerability has been resolved: of: unittest: fix use-after-free in testdrv_probe() The function testdrv_probe() retrieves the device_node from the PCI device, applies an overlay, and then immediately calls of_node_put(dn). This releases the reference held by the PCI core, potentially freeing the node if the reference count drops to zero. Later, the same freed pointer 'dn' is passed to of_platform_default_populate(), leading to a use-after-free. The reference to pdev->dev.of_node is owned by the device model and should not be released by the driver. Remove the erroneous of_node_put() to prevent premature freeing.",
"evidence": "osv:CVE-2026-45989",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.6.140",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.86",
"evidence": "/affected/1/ranges"
},
{
"value": "6.18.27",
"evidence": "/affected/1/ranges"
},
{
"value": "7.0.4",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2026-45989",
"aliases": [
"CVE-2026-45989"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "26409dd045892904b059dc411403e9c8ce7543ca"
},
{
"fixed": "0ba03e06f037df704d9b032e36d417633e2326bc"
},
{
"fixed": "d68347b07b9801791c9eaab8f772770b52b8cd5c"
},
{
"fixed": "5b6122a67a295f8a08b7c18d908a1bd974dfaec8"
},
{
"fixed": "6b2023286d2c6ed3bf964fb92e34c9c14d42eb69"
},
{
"fixed": "07fd339b2c253205794bea5d9b4b7548a4546c56"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-45989.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.6.0"
},
{
"fixed": "6.6.140"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.86"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.18.27"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.19.0"
},
{
"fixed": "7.0.4"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-45989.json"
}
}
],
"modified": "2026-10-28T02:30:27.270153801Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/07fd339b2c253205794bea5d9b4b7548a4546c56",
"https://git.kernel.org/stable/c/0ba03e06f037df704d9b032e36d417633e2326bc",
"https://git.kernel.org/stable/c/5b6122a67a295f8a08b7c18d908a1bd974dfaec8",
"https://git.kernel.org/stable/c/6b2023286d2c6ed3bf964fb92e34c9c14d42eb69",
"https://git.kernel.org/stable/c/d68347b07b9801791c9eaab8f772770b52b8cd5c",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/45xxx/CVE-2026-45989.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-45989",
"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/2026/45xxx/CVE-2026-45989.json"
}
},
"related_cves": [
{
"value": "CVE-2026-45989",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 493674,
"published_at": "2026-05-27T12:55:41.276+00:00"
}