Linux Kernel Unittest Component Use-After-Free Vulnerability

Vulnerability

A use-after-free vulnerability has been identified in the Linux kernel's unittest component. The issue arises in the 'of_unittest_changeset' function, where the 'parent' variable is assigned the same value as 'nchangeset', pointing to the same struct device_node. The vulnerability occurs when 'of_node_put(nchangeset)' is called, potentially freeing the node if no other references exist. Subsequently, the code still uses 'parent' to access properties, leading to a use-after-free condition. This vulnerability affects the Linux kernel stable tree.

Impact

Exploitation of this vulnerability can lead to a use-after-free condition, which may be exploited to cause memory corruption or execute arbitrary code.

Reproduction

The vulnerability can be reproduced by applying a changeset in the unittest framework that involves modifying a device node's properties. The 'of_unittest_changeset' function can be used to demonstrate the issue, as it inadvertently creates a use-after-free scenario by releasing a node reference before the last property access.

Remediation

The vulnerability has been fixed by adjusting the order of operations in the 'of_unittest_changeset' function. Users should upgrade to the latest version of the Linux kernel stable tree where this fix has been applied.

Added: Jun 8, 2026, 5:56 PM
Updated: Jun 8, 2026, 5:56 PM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
0.6
exploitability
3.9
remediation
7.7
relevance
9.3
threat
4.8
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.