CVE-2024-56772: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: kunit: string-stream: Fix a UAF bug in kunit_init_suite() In kunit_debugfs_create_suite(), if alloc_string_stream() fails in the kunit_suite_for_each_test_case() loop, the "suite->log = stream" has assigned before, and the error path only free the suite->log's stream memory but not set it to NULL, so the later string_stream_clear() of suite->log in kunit_init_suite() will cause below UAF bug. Set stream pointer to NULL after free to fix it. Unable to handle kernel paging request at virtual address 006440150000030d Mem abort info: ESR = 0x0000000096000004 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x04: level 0 translation fault Data abort info: ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 CM = 0, WnR = 0, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [006440150000030d] address between user and kernel address ranges Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: iio_test_gts industrialio_gts_helper cfg80211 rfkill ipv6 [last unloaded: iio_test_gts] CPU: 5 UID: 0 PID: 6253 Comm: modprobe Tainted: G B W N 6.12.0-rc4+ #458 Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST Hardware name: linux,dummy-virt (DT) pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : string_stream_clear+0x54/0x1ac lr : string_stream_clear+0x1a8/0x1ac sp : ffffffc080b47410 x29: ffffffc080b47410 x28: 006440550000030d x27: ffffff80c96b5e98 x26: ffffff80c96b5e80 x25: ffffffe461b3f6c0 x24: 0000000000000003 x23: ffffff80c96b5e88 x22: 1ffffff019cdf4fc x21: dfffffc000000000 x20: ffffff80ce6fa7e0 x19: 032202a80000186d x18: 0000000000001840 x17: 0000000000000000 x16: 0000000000000000 x15: ffffffe45c355cb4 x14: ffffffe45c35589c x13: ffffffe45c03da78 x12: ffffffb810168e75 x11: 1ffffff810168e74 x10: ffffffb810168e74 x9 : dfffffc000000000 x8 : 0000000000000004 x7 : 0000000000000003 x6 : 0000000000000001 x5 : ffffffc080b473a0 x4 : 0000000000000000 x3 : 0000000000000000 x2 : 0000000000000001 x1 : ffffffe462fbf620 x0 : dfffffc000000000 Call trace: string_stream_clear+0x54/0x1ac __kunit_test_suites_init+0x108/0x1d8 kunit_exec_run_tests+0xb8/0x100 kunit_module_notify+0x400/0x55c notifier_call_chain+0xfc/0x3b4 blocking_notifier_call_chain+0x68/0x9c do_init_module+0x24c/0x5c8 load_module+0x4acc/0x4e90 init_module_from_file+0xd4/0x128 idempotent_init_module+0x2d4/0x57c __arm64_sys_finit_module+0xac/0x100 invoke_syscall+0x6c/0x258 el0_svc_common.constprop.0+0x160/0x22c do_el0_svc+0x44/0x5c el0_svc+0x48/0xb8 el0t_64_sync_handler+0x13c/0x158 el0t_64_sync+0x190/0x194 Code: f9400753 d2dff800 f2fbffe0 d343fe7c (38e06b80) ---[ end trace 0000000000000000 ]--- Kernel panic - not syncing: Oops: Fatal exception
AI Analysis
Technical Summary
CVE-2024-56772 is a high-severity use-after-free (UAF) vulnerability in the Linux kernel's KUnit testing framework, specifically within the string-stream handling code. The flaw occurs in the kunit_init_suite() function during the initialization of test suites. When the function kunit_debugfs_create_suite() calls alloc_string_stream() inside a loop iterating over test cases, a failure in allocation leads to an error path that frees the previously assigned suite->log stream memory but does not reset the pointer to NULL. Subsequently, string_stream_clear() is called on this dangling pointer, causing a use-after-free condition. This results in a kernel memory access violation, leading to kernel panics and potential system crashes. The vulnerability is identified by the kernel panic logs showing an invalid memory access at a virtual address outside the user and kernel address ranges, indicating corruption of kernel memory. The issue affects specific Linux kernel versions identified by commit hashes and was fixed by ensuring the stream pointer is set to NULL after freeing, preventing the UAF. The vulnerability has a CVSS v3.1 score of 7.8, reflecting high impact on confidentiality, integrity, and availability, with low attack complexity but requiring local privileges and no user interaction. Exploitation could allow an attacker with limited privileges to cause denial of service via kernel panic or potentially escalate privileges by exploiting kernel memory corruption. No known exploits are currently reported in the wild. The vulnerability is classified under CWE-416 (Use After Free).
Potential Impact
For European organizations, this vulnerability poses a significant risk primarily to systems running vulnerable Linux kernel versions that include the affected KUnit testing framework code. Since the flaw can cause kernel panics and system crashes, it can lead to denial of service conditions on critical infrastructure, servers, and embedded devices running Linux. In environments where Linux is used extensively, such as cloud providers, data centers, telecommunications, and industrial control systems, this could disrupt operations and availability. Moreover, the potential for privilege escalation through kernel memory corruption could allow attackers to gain unauthorized root access, threatening confidentiality and integrity of sensitive data. Given the widespread use of Linux in European government agencies, enterprises, and critical infrastructure, the impact could be substantial if exploited. However, exploitation requires local privileges, limiting remote attack vectors but increasing risk from insider threats or compromised accounts. The absence of known exploits in the wild reduces immediate risk but emphasizes the need for proactive patching to prevent future attacks.
Mitigation Recommendations
European organizations should promptly identify and update all Linux systems running affected kernel versions to the latest patched releases where the UAF bug in kunit_init_suite() is fixed. Since the vulnerability requires local privileges, organizations should enforce strict access controls and limit user permissions to reduce the attack surface. Employ kernel hardening techniques such as Kernel Address Space Layout Randomization (KASLR), Kernel Page Table Isolation (KPTI), and use of security modules like SELinux or AppArmor to mitigate exploitation impact. Regularly audit and monitor kernel logs for unusual crashes or panics that could indicate exploitation attempts. For environments using automated testing frameworks or continuous integration pipelines that utilize KUnit, ensure these components are updated and isolated from production systems. Additionally, implement robust endpoint detection and response (EDR) solutions capable of detecting anomalous kernel-level activities. Finally, maintain an inventory of Linux kernel versions deployed across the organization to facilitate rapid vulnerability management and patch deployment.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Sweden, Finland
CVE-2024-56772: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: kunit: string-stream: Fix a UAF bug in kunit_init_suite() In kunit_debugfs_create_suite(), if alloc_string_stream() fails in the kunit_suite_for_each_test_case() loop, the "suite->log = stream" has assigned before, and the error path only free the suite->log's stream memory but not set it to NULL, so the later string_stream_clear() of suite->log in kunit_init_suite() will cause below UAF bug. Set stream pointer to NULL after free to fix it. Unable to handle kernel paging request at virtual address 006440150000030d Mem abort info: ESR = 0x0000000096000004 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x04: level 0 translation fault Data abort info: ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 CM = 0, WnR = 0, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [006440150000030d] address between user and kernel address ranges Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: iio_test_gts industrialio_gts_helper cfg80211 rfkill ipv6 [last unloaded: iio_test_gts] CPU: 5 UID: 0 PID: 6253 Comm: modprobe Tainted: G B W N 6.12.0-rc4+ #458 Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST Hardware name: linux,dummy-virt (DT) pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : string_stream_clear+0x54/0x1ac lr : string_stream_clear+0x1a8/0x1ac sp : ffffffc080b47410 x29: ffffffc080b47410 x28: 006440550000030d x27: ffffff80c96b5e98 x26: ffffff80c96b5e80 x25: ffffffe461b3f6c0 x24: 0000000000000003 x23: ffffff80c96b5e88 x22: 1ffffff019cdf4fc x21: dfffffc000000000 x20: ffffff80ce6fa7e0 x19: 032202a80000186d x18: 0000000000001840 x17: 0000000000000000 x16: 0000000000000000 x15: ffffffe45c355cb4 x14: ffffffe45c35589c x13: ffffffe45c03da78 x12: ffffffb810168e75 x11: 1ffffff810168e74 x10: ffffffb810168e74 x9 : dfffffc000000000 x8 : 0000000000000004 x7 : 0000000000000003 x6 : 0000000000000001 x5 : ffffffc080b473a0 x4 : 0000000000000000 x3 : 0000000000000000 x2 : 0000000000000001 x1 : ffffffe462fbf620 x0 : dfffffc000000000 Call trace: string_stream_clear+0x54/0x1ac __kunit_test_suites_init+0x108/0x1d8 kunit_exec_run_tests+0xb8/0x100 kunit_module_notify+0x400/0x55c notifier_call_chain+0xfc/0x3b4 blocking_notifier_call_chain+0x68/0x9c do_init_module+0x24c/0x5c8 load_module+0x4acc/0x4e90 init_module_from_file+0xd4/0x128 idempotent_init_module+0x2d4/0x57c __arm64_sys_finit_module+0xac/0x100 invoke_syscall+0x6c/0x258 el0_svc_common.constprop.0+0x160/0x22c do_el0_svc+0x44/0x5c el0_svc+0x48/0xb8 el0t_64_sync_handler+0x13c/0x158 el0t_64_sync+0x190/0x194 Code: f9400753 d2dff800 f2fbffe0 d343fe7c (38e06b80) ---[ end trace 0000000000000000 ]--- Kernel panic - not syncing: Oops: Fatal exception
AI-Powered Analysis
Technical Analysis
CVE-2024-56772 is a high-severity use-after-free (UAF) vulnerability in the Linux kernel's KUnit testing framework, specifically within the string-stream handling code. The flaw occurs in the kunit_init_suite() function during the initialization of test suites. When the function kunit_debugfs_create_suite() calls alloc_string_stream() inside a loop iterating over test cases, a failure in allocation leads to an error path that frees the previously assigned suite->log stream memory but does not reset the pointer to NULL. Subsequently, string_stream_clear() is called on this dangling pointer, causing a use-after-free condition. This results in a kernel memory access violation, leading to kernel panics and potential system crashes. The vulnerability is identified by the kernel panic logs showing an invalid memory access at a virtual address outside the user and kernel address ranges, indicating corruption of kernel memory. The issue affects specific Linux kernel versions identified by commit hashes and was fixed by ensuring the stream pointer is set to NULL after freeing, preventing the UAF. The vulnerability has a CVSS v3.1 score of 7.8, reflecting high impact on confidentiality, integrity, and availability, with low attack complexity but requiring local privileges and no user interaction. Exploitation could allow an attacker with limited privileges to cause denial of service via kernel panic or potentially escalate privileges by exploiting kernel memory corruption. No known exploits are currently reported in the wild. The vulnerability is classified under CWE-416 (Use After Free).
Potential Impact
For European organizations, this vulnerability poses a significant risk primarily to systems running vulnerable Linux kernel versions that include the affected KUnit testing framework code. Since the flaw can cause kernel panics and system crashes, it can lead to denial of service conditions on critical infrastructure, servers, and embedded devices running Linux. In environments where Linux is used extensively, such as cloud providers, data centers, telecommunications, and industrial control systems, this could disrupt operations and availability. Moreover, the potential for privilege escalation through kernel memory corruption could allow attackers to gain unauthorized root access, threatening confidentiality and integrity of sensitive data. Given the widespread use of Linux in European government agencies, enterprises, and critical infrastructure, the impact could be substantial if exploited. However, exploitation requires local privileges, limiting remote attack vectors but increasing risk from insider threats or compromised accounts. The absence of known exploits in the wild reduces immediate risk but emphasizes the need for proactive patching to prevent future attacks.
Mitigation Recommendations
European organizations should promptly identify and update all Linux systems running affected kernel versions to the latest patched releases where the UAF bug in kunit_init_suite() is fixed. Since the vulnerability requires local privileges, organizations should enforce strict access controls and limit user permissions to reduce the attack surface. Employ kernel hardening techniques such as Kernel Address Space Layout Randomization (KASLR), Kernel Page Table Isolation (KPTI), and use of security modules like SELinux or AppArmor to mitigate exploitation impact. Regularly audit and monitor kernel logs for unusual crashes or panics that could indicate exploitation attempts. For environments using automated testing frameworks or continuous integration pipelines that utilize KUnit, ensure these components are updated and isolated from production systems. Additionally, implement robust endpoint detection and response (EDR) solutions capable of detecting anomalous kernel-level activities. Finally, maintain an inventory of Linux kernel versions deployed across the organization to facilitate rapid vulnerability management and patch deployment.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-12-29T11:26:39.763Z
- Cisa Enriched
- true
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 682d9822c4522896dcbde7b3
Added to database: 5/21/2025, 9:08:50 AM
Last enriched: 7/2/2025, 10:26:39 PM
Last updated: 8/14/2025, 7:22:25 PM
Views: 13
Related Threats
CVE-2025-53948: CWE-415 Double Free in Santesoft Sante PACS Server
HighCVE-2025-52584: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-46269: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-54862: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumCVE-2025-54759: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.