PT-2025-3319 · Linux+2 · Linux Kernel+2
Jinjie Ruan
+1
·
Published
2025-01-08
·
Updated
2025-05-26
·
CVE-2024-56772
CVSS v3.1
7.8
High
| Vector | AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions
Linux kernel versions prior to 6.12.0-rc4+
Description
A Use-After-Free (UAF) bug has been fixed in the Linux kernel's KUnit string stream function. The issue occurs when
alloc string stream() fails in the kunit suite for each test case() loop, causing the suite->log stream memory to be freed but not set to NULL. This leads to a UAF bug when string stream clear() is called later. The error path only frees the suite->log stream memory but not sets it to NULL, resulting in a UAF bug.Technical details about exploitation include:
- The
string stream clear()function is vulnerable. - The
alloc string stream()function fails in thekunit suite for each test case()loop. - The
suite->logstream memory is freed but not set to NULL.
Recommendations
To resolve the issue, update the Linux kernel to a version that includes the fix for the UAF bug. As a temporary workaround, consider disabling the
string stream clear() function until a patch is available. Restrict access to the vulnerable kunit debugfs create suite() function to minimize the risk of exploitation. Avoid using the suite->log stream in the affected API endpoint until the issue is resolved.
At the moment, there is no information about a newer version that contains a fix for this vulnerability.Exploit
Use After Free
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Linuxmint
Linux Kernel
Ubuntu