CVE-2021-47346: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: coresight: tmc-etf: Fix global-out-of-bounds in tmc_update_etf_buffer() commit 6f755e85c332 ("coresight: Add helper for inserting synchronization packets") removed trailing '\0' from barrier_pkt array and updated the call sites like etb_update_buffer() to have proper checks for barrier_pkt size before read but missed updating tmc_update_etf_buffer() which still reads barrier_pkt past the array size resulting in KASAN out-of-bounds bug. Fix this by adding a check for barrier_pkt size before accessing like it is done in etb_update_buffer(). BUG: KASAN: global-out-of-bounds in tmc_update_etf_buffer+0x4b8/0x698 Read of size 4 at addr ffffffd05b7d1030 by task perf/2629 Call trace: dump_backtrace+0x0/0x27c show_stack+0x20/0x2c dump_stack+0x11c/0x188 print_address_description+0x3c/0x4a4 __kasan_report+0x140/0x164 kasan_report+0x10/0x18 __asan_report_load4_noabort+0x1c/0x24 tmc_update_etf_buffer+0x4b8/0x698 etm_event_stop+0x248/0x2d8 etm_event_del+0x20/0x2c event_sched_out+0x214/0x6f0 group_sched_out+0xd0/0x270 ctx_sched_out+0x2ec/0x518 __perf_event_task_sched_out+0x4fc/0xe6c __schedule+0x1094/0x16a0 preempt_schedule_irq+0x88/0x170 arm64_preempt_schedule_irq+0xf0/0x18c el1_irq+0xe8/0x180 perf_event_exec+0x4d8/0x56c setup_new_exec+0x204/0x400 load_elf_binary+0x72c/0x18c0 search_binary_handler+0x13c/0x420 load_script+0x500/0x6c4 search_binary_handler+0x13c/0x420 exec_binprm+0x118/0x654 __do_execve_file+0x77c/0xba4 __arm64_compat_sys_execve+0x98/0xac el0_svc_common+0x1f8/0x5e0 el0_svc_compat_handler+0x84/0xb0 el0_svc_compat+0x10/0x50 The buggy address belongs to the variable: barrier_pkt+0x10/0x40 Memory state around the buggy address: ffffffd05b7d0f00: fa fa fa fa 04 fa fa fa fa fa fa fa 00 00 00 00 ffffffd05b7d0f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffffd05b7d1000: 00 00 00 00 00 00 fa fa fa fa fa fa 00 00 00 03 ^ ffffffd05b7d1080: fa fa fa fa 00 02 fa fa fa fa fa fa 03 fa fa fa ffffffd05b7d1100: fa fa fa fa 00 00 00 00 05 fa fa fa fa fa fa fa ==================================================================
AI Analysis
Technical Summary
CVE-2021-47346 is a vulnerability identified in the Linux kernel, specifically within the coresight subsystem's tmc-etf component. The issue arises from an out-of-bounds read in the function tmc_update_etf_buffer(). This function improperly accesses the barrier_pkt array beyond its allocated size due to a missing boundary check. The vulnerability was introduced after a commit (6f755e85c332) that removed a trailing '\0' from the barrier_pkt array and updated related functions to include proper size checks, but failed to update tmc_update_etf_buffer() accordingly. As a result, tmc_update_etf_buffer() reads 4 bytes past the array boundary, triggering a Kernel Address Sanitizer (KASAN) global out-of-bounds error. The flaw can cause kernel memory corruption or crashes when the perf subsystem interacts with the coresight tracing infrastructure, particularly during event stopping or deletion operations. The detailed call trace shows the error occurs during perf event scheduling and execution, indicating that performance monitoring tools or kernel tracing utilities that use this code path are affected. The vulnerability affects multiple versions of the Linux kernel identified by the same commit hash, indicating a persistent issue until patched. No known exploits are reported in the wild, and no CVSS score has been assigned yet. The vulnerability primarily impacts kernel stability and memory safety, potentially leading to denial of service or information disclosure under certain conditions.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to systems running vulnerable Linux kernel versions with the coresight tmc-etf component enabled. This includes servers, embedded devices, and workstations that utilize Linux for performance monitoring or tracing. Exploitation could lead to kernel crashes, causing denial of service and potential disruption of critical services. In environments where Linux kernels are used extensively, such as cloud providers, telecommunications infrastructure, and industrial control systems, this could impact availability and operational continuity. Although no active exploits are known, the vulnerability's presence in the kernel could be leveraged by attackers with local access or through malicious perf event configurations to destabilize systems or gain insights into kernel memory layout, potentially aiding further attacks. European organizations relying on Linux-based infrastructure for critical operations should consider this vulnerability seriously, especially those in sectors like finance, healthcare, and government where uptime and data integrity are paramount.
Mitigation Recommendations
1. Apply the official Linux kernel patches that fix the out-of-bounds read in tmc_update_etf_buffer() as soon as they become available from trusted Linux distribution vendors or upstream kernel sources. 2. Disable or restrict usage of the coresight tmc-etf component and related perf event tracing features if they are not required, reducing the attack surface. 3. Implement strict access controls to limit which users or processes can invoke perf events or kernel tracing functionalities, preventing unprivileged exploitation attempts. 4. Monitor kernel logs and system behavior for signs of KASAN reports or unexpected kernel crashes related to perf events, enabling early detection of exploitation attempts. 5. For embedded or specialized Linux systems, ensure that kernel versions are regularly updated and that custom kernels incorporate the patch. 6. Employ kernel hardening techniques such as Kernel Address Space Layout Randomization (KASLR) and Kernel Page Table Isolation (KPTI) to mitigate potential exploitation impact. 7. Coordinate with Linux distribution maintainers and security teams to track patch releases and vulnerability disclosures to maintain timely updates.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Sweden, Finland, Poland, Belgium
CVE-2021-47346: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: coresight: tmc-etf: Fix global-out-of-bounds in tmc_update_etf_buffer() commit 6f755e85c332 ("coresight: Add helper for inserting synchronization packets") removed trailing '\0' from barrier_pkt array and updated the call sites like etb_update_buffer() to have proper checks for barrier_pkt size before read but missed updating tmc_update_etf_buffer() which still reads barrier_pkt past the array size resulting in KASAN out-of-bounds bug. Fix this by adding a check for barrier_pkt size before accessing like it is done in etb_update_buffer(). BUG: KASAN: global-out-of-bounds in tmc_update_etf_buffer+0x4b8/0x698 Read of size 4 at addr ffffffd05b7d1030 by task perf/2629 Call trace: dump_backtrace+0x0/0x27c show_stack+0x20/0x2c dump_stack+0x11c/0x188 print_address_description+0x3c/0x4a4 __kasan_report+0x140/0x164 kasan_report+0x10/0x18 __asan_report_load4_noabort+0x1c/0x24 tmc_update_etf_buffer+0x4b8/0x698 etm_event_stop+0x248/0x2d8 etm_event_del+0x20/0x2c event_sched_out+0x214/0x6f0 group_sched_out+0xd0/0x270 ctx_sched_out+0x2ec/0x518 __perf_event_task_sched_out+0x4fc/0xe6c __schedule+0x1094/0x16a0 preempt_schedule_irq+0x88/0x170 arm64_preempt_schedule_irq+0xf0/0x18c el1_irq+0xe8/0x180 perf_event_exec+0x4d8/0x56c setup_new_exec+0x204/0x400 load_elf_binary+0x72c/0x18c0 search_binary_handler+0x13c/0x420 load_script+0x500/0x6c4 search_binary_handler+0x13c/0x420 exec_binprm+0x118/0x654 __do_execve_file+0x77c/0xba4 __arm64_compat_sys_execve+0x98/0xac el0_svc_common+0x1f8/0x5e0 el0_svc_compat_handler+0x84/0xb0 el0_svc_compat+0x10/0x50 The buggy address belongs to the variable: barrier_pkt+0x10/0x40 Memory state around the buggy address: ffffffd05b7d0f00: fa fa fa fa 04 fa fa fa fa fa fa fa 00 00 00 00 ffffffd05b7d0f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffffd05b7d1000: 00 00 00 00 00 00 fa fa fa fa fa fa 00 00 00 03 ^ ffffffd05b7d1080: fa fa fa fa 00 02 fa fa fa fa fa fa 03 fa fa fa ffffffd05b7d1100: fa fa fa fa 00 00 00 00 05 fa fa fa fa fa fa fa ==================================================================
AI-Powered Analysis
Technical Analysis
CVE-2021-47346 is a vulnerability identified in the Linux kernel, specifically within the coresight subsystem's tmc-etf component. The issue arises from an out-of-bounds read in the function tmc_update_etf_buffer(). This function improperly accesses the barrier_pkt array beyond its allocated size due to a missing boundary check. The vulnerability was introduced after a commit (6f755e85c332) that removed a trailing '\0' from the barrier_pkt array and updated related functions to include proper size checks, but failed to update tmc_update_etf_buffer() accordingly. As a result, tmc_update_etf_buffer() reads 4 bytes past the array boundary, triggering a Kernel Address Sanitizer (KASAN) global out-of-bounds error. The flaw can cause kernel memory corruption or crashes when the perf subsystem interacts with the coresight tracing infrastructure, particularly during event stopping or deletion operations. The detailed call trace shows the error occurs during perf event scheduling and execution, indicating that performance monitoring tools or kernel tracing utilities that use this code path are affected. The vulnerability affects multiple versions of the Linux kernel identified by the same commit hash, indicating a persistent issue until patched. No known exploits are reported in the wild, and no CVSS score has been assigned yet. The vulnerability primarily impacts kernel stability and memory safety, potentially leading to denial of service or information disclosure under certain conditions.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to systems running vulnerable Linux kernel versions with the coresight tmc-etf component enabled. This includes servers, embedded devices, and workstations that utilize Linux for performance monitoring or tracing. Exploitation could lead to kernel crashes, causing denial of service and potential disruption of critical services. In environments where Linux kernels are used extensively, such as cloud providers, telecommunications infrastructure, and industrial control systems, this could impact availability and operational continuity. Although no active exploits are known, the vulnerability's presence in the kernel could be leveraged by attackers with local access or through malicious perf event configurations to destabilize systems or gain insights into kernel memory layout, potentially aiding further attacks. European organizations relying on Linux-based infrastructure for critical operations should consider this vulnerability seriously, especially those in sectors like finance, healthcare, and government where uptime and data integrity are paramount.
Mitigation Recommendations
1. Apply the official Linux kernel patches that fix the out-of-bounds read in tmc_update_etf_buffer() as soon as they become available from trusted Linux distribution vendors or upstream kernel sources. 2. Disable or restrict usage of the coresight tmc-etf component and related perf event tracing features if they are not required, reducing the attack surface. 3. Implement strict access controls to limit which users or processes can invoke perf events or kernel tracing functionalities, preventing unprivileged exploitation attempts. 4. Monitor kernel logs and system behavior for signs of KASAN reports or unexpected kernel crashes related to perf events, enabling early detection of exploitation attempts. 5. For embedded or specialized Linux systems, ensure that kernel versions are regularly updated and that custom kernels incorporate the patch. 6. Employ kernel hardening techniques such as Kernel Address Space Layout Randomization (KASLR) and Kernel Page Table Isolation (KPTI) to mitigate potential exploitation impact. 7. Coordinate with Linux distribution maintainers and security teams to track patch releases and vulnerability disclosures to maintain timely updates.
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-05-21T14:28:16.980Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9835c4522896dcbea517
Added to database: 5/21/2025, 9:09:09 AM
Last enriched: 6/26/2025, 10:36:46 AM
Last updated: 8/6/2025, 12:15:31 PM
Views: 13
Related Threats
CVE-2025-9020: Use After Free in PX4 PX4-Autopilot
LowCVE-2025-8604: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in wptb WP Table Builder – WordPress Table Plugin
MediumCVE-2025-9016: Uncontrolled Search Path in Mechrevo Control Center GX V2
HighCVE-2025-8451: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in wpdevteam Essential Addons for Elementor – Popular Elementor Templates & Widgets
MediumCVE-2025-8013: CWE-918 Server-Side Request Forgery (SSRF) in quttera Quttera Web Malware Scanner
LowActions
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.