Skip to main content

CVE-2023-53135: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2023-53135cvecve-2023-53135
Published: Fri May 02 2025 (05/02/2025, 15:56:08 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: riscv: Use READ_ONCE_NOCHECK in imprecise unwinding stack mode When CONFIG_FRAME_POINTER is unset, the stack unwinding function walk_stackframe randomly reads the stack and then, when KASAN is enabled, it can lead to the following backtrace: [ 0.000000] ================================================================== [ 0.000000] BUG: KASAN: stack-out-of-bounds in walk_stackframe+0xa6/0x11a [ 0.000000] Read of size 8 at addr ffffffff81807c40 by task swapper/0 [ 0.000000] [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 6.2.0-12919-g24203e6db61f #43 [ 0.000000] Hardware name: riscv-virtio,qemu (DT) [ 0.000000] Call Trace: [ 0.000000] [<ffffffff80007ba8>] walk_stackframe+0x0/0x11a [ 0.000000] [<ffffffff80099ecc>] init_param_lock+0x26/0x2a [ 0.000000] [<ffffffff80007c4a>] walk_stackframe+0xa2/0x11a [ 0.000000] [<ffffffff80c49c80>] dump_stack_lvl+0x22/0x36 [ 0.000000] [<ffffffff80c3783e>] print_report+0x198/0x4a8 [ 0.000000] [<ffffffff80099ecc>] init_param_lock+0x26/0x2a [ 0.000000] [<ffffffff80007c4a>] walk_stackframe+0xa2/0x11a [ 0.000000] [<ffffffff8015f68a>] kasan_report+0x9a/0xc8 [ 0.000000] [<ffffffff80007c4a>] walk_stackframe+0xa2/0x11a [ 0.000000] [<ffffffff80007c4a>] walk_stackframe+0xa2/0x11a [ 0.000000] [<ffffffff8006e99c>] desc_make_final+0x80/0x84 [ 0.000000] [<ffffffff8009a04e>] stack_trace_save+0x88/0xa6 [ 0.000000] [<ffffffff80099fc2>] filter_irq_stacks+0x72/0x76 [ 0.000000] [<ffffffff8006b95e>] devkmsg_read+0x32a/0x32e [ 0.000000] [<ffffffff8015ec16>] kasan_save_stack+0x28/0x52 [ 0.000000] [<ffffffff8006e998>] desc_make_final+0x7c/0x84 [ 0.000000] [<ffffffff8009a04a>] stack_trace_save+0x84/0xa6 [ 0.000000] [<ffffffff8015ec52>] kasan_set_track+0x12/0x20 [ 0.000000] [<ffffffff8015f22e>] __kasan_slab_alloc+0x58/0x5e [ 0.000000] [<ffffffff8015e7ea>] __kmem_cache_create+0x21e/0x39a [ 0.000000] [<ffffffff80e133ac>] create_boot_cache+0x70/0x9c [ 0.000000] [<ffffffff80e17ab2>] kmem_cache_init+0x6c/0x11e [ 0.000000] [<ffffffff80e00fd6>] mm_init+0xd8/0xfe [ 0.000000] [<ffffffff80e011d8>] start_kernel+0x190/0x3ca [ 0.000000] [ 0.000000] The buggy address belongs to stack of task swapper/0 [ 0.000000] and is located at offset 0 in frame: [ 0.000000] stack_trace_save+0x0/0xa6 [ 0.000000] [ 0.000000] This frame has 1 object: [ 0.000000] [32, 56) 'c' [ 0.000000] [ 0.000000] The buggy address belongs to the physical page: [ 0.000000] page:(____ptrval____) refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x81a07 [ 0.000000] flags: 0x1000(reserved|zone=0) [ 0.000000] raw: 0000000000001000 ff600003f1e3d150 ff600003f1e3d150 0000000000000000 [ 0.000000] raw: 0000000000000000 0000000000000000 00000001ffffffff [ 0.000000] page dumped because: kasan: bad access detected [ 0.000000] [ 0.000000] Memory state around the buggy address: [ 0.000000] ffffffff81807b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 0.000000] ffffffff81807b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 0.000000] >ffffffff81807c00: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 f3 [ 0.000000] ^ [ 0.000000] ffffffff81807c80: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 [ 0.000000] ffffffff81807d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 0.000000] ================================================================== Fix that by using READ_ONCE_NOCHECK when reading the stack in imprecise mode.

AI-Powered Analysis

AILast updated: 07/01/2025, 04:54:46 UTC

Technical Analysis

CVE-2023-53135 is a vulnerability identified in the Linux kernel specifically affecting the RISC-V architecture implementation of the stack unwinding function when the kernel is configured without frame pointers (CONFIG_FRAME_POINTER unset). The issue arises in the walk_stackframe function, which is responsible for stack unwinding, a process used for debugging and error reporting. In imprecise unwinding mode, the function reads stack memory locations without proper safeguards, leading to potential out-of-bounds reads. When Kernel Address Sanitizer (KASAN) is enabled, this results in a stack-out-of-bounds error, as demonstrated by the provided kernel backtrace. The root cause is that the stack is read directly without using the READ_ONCE_NOCHECK macro, which is designed to safely read memory in such contexts. This can cause the kernel to access invalid memory locations on the stack, potentially leading to kernel crashes or undefined behavior. The vulnerability is specific to the RISC-V architecture and only manifests when frame pointers are disabled and KASAN is enabled, conditions typically present in debugging or development environments rather than production systems. The fix involves modifying the stack reading code to use READ_ONCE_NOCHECK, preventing unsafe memory accesses during stack unwinding in imprecise mode. There are no known exploits in the wild, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, the direct impact of CVE-2023-53135 is likely limited due to its specificity: it affects Linux kernels running on RISC-V architecture with particular kernel configurations (no frame pointers and KASAN enabled). Most production Linux systems in Europe run on x86_64 or ARM architectures rather than RISC-V, and KASAN is generally used for debugging rather than in production. However, organizations involved in RISC-V development, embedded systems, or research institutions using RISC-V Linux kernels could experience kernel instability or crashes if they use affected kernel versions without the patch. This could disrupt development workflows or testing environments. Additionally, if RISC-V adoption grows in European industry sectors such as telecommunications, automotive, or IoT, this vulnerability could become more relevant. Although no direct exploitation is known, the vulnerability could be leveraged by attackers with local access to cause denial of service or kernel crashes, impacting system availability. Confidentiality and integrity impacts are minimal since the vulnerability is a read out-of-bounds error rather than a write or code execution flaw.

Mitigation Recommendations

European organizations should ensure that Linux kernels running on RISC-V architectures are updated to versions that include the patch for CVE-2023-53135. Specifically, kernel maintainers and developers should apply the fix that uses READ_ONCE_NOCHECK in the stack unwinding code to prevent unsafe memory reads. For production environments, it is advisable to enable frame pointers (CONFIG_FRAME_POINTER) if possible, as this avoids the imprecise unwinding mode that triggers the vulnerability. Since KASAN is primarily a debugging tool, it should be disabled in production systems to reduce exposure. Organizations developing or testing on RISC-V Linux kernels should incorporate this patch into their build and CI pipelines to prevent instability. Monitoring kernel logs for KASAN reports or stack-out-of-bounds errors can help detect attempts to trigger this vulnerability. Additionally, limiting local access to systems running vulnerable kernels reduces the risk of exploitation. Finally, organizations should track Linux kernel updates and security advisories to promptly apply relevant patches.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-05-02T15:51:43.561Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9830c4522896dcbe70bb

Added to database: 5/21/2025, 9:09:04 AM

Last enriched: 7/1/2025, 4:54:46 AM

Last updated: 8/7/2025, 12:54:29 PM

Views: 11

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats