# CVE-2026-45989: of: unittest: fix use-after-free in testdrv_probe()

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.16%, higher than 5% of CVEs (2026-12-01)
- Published: 2026-05-27T12:55:41.276Z
- Modified: 2026-06-17T10:52:51.500Z
- Weaknesses: CWE-416
- Assigned by: Linux

## Description

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.

(As written by CVE List.)

## Affected

- Linux Linux: from 26409dd045892904b059dc411403e9c8ce7543ca before 0ba03e06f037df704d9b032e36d417633e2326bc; from 26409dd045892904b059dc411403e9c8ce7543ca before d68347b07b9801791c9eaab8f772770b52b8cd5c; from 26409dd045892904b059dc411403e9c8ce7543ca before 5b6122a67a295f8a08b7c18d908a1bd974dfaec8; from 26409dd045892904b059dc411403e9c8ce7543ca before 6b2023286d2c6ed3bf964fb92e34c9c14d42eb69; from 26409dd045892904b059dc411403e9c8ce7543ca before 07fd339b2c253205794bea5d9b4b7548a4546c56; 6.6 (not affected: before 6.6; from 6.6.140 up to 6.6.*; from 6.12.86 up to 6.12.*; from 6.18.27 up to 6.18.*; from 7.0.4 up to 7.0.*; from 7.1 up to *)
- linux linux_kernel: from 6.6 before 6.6.140; from 6.7 before 6.12.86; from 6.13 before 6.18.27; from 6.19 before 7.0.4

## References

- <https://git.kernel.org/stable/c/0ba03e06f037df704d9b032e36d417633e2326bc> (patch)
- <https://git.kernel.org/stable/c/d68347b07b9801791c9eaab8f772770b52b8cd5c> (patch)
- <https://git.kernel.org/stable/c/5b6122a67a295f8a08b7c18d908a1bd974dfaec8> (patch)
- <https://git.kernel.org/stable/c/6b2023286d2c6ed3bf964fb92e34c9c14d42eb69> (patch)
- <https://git.kernel.org/stable/c/07fd339b2c253205794bea5d9b4b7548a4546c56> (patch)

## Sources

- CVE List: [CVE-2026-45989](https://www.cve.org/CVERecord?id=CVE-2026-45989), CVE Terms of Use, modified 2026-06-14
- NVD: [CVE-2026-45989](https://nvd.nist.gov/vuln/detail/CVE-2026-45989), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-45989 · Whole record: https://cve.day/CVE-2026-45989.json · Rebuilt by cve.day 2026-11-25T22:59:22.534Z
