Skip to main content

CVE-2021-47142: Vulnerability in Linux Linux

High
VulnerabilityCVE-2021-47142cvecve-2021-47142
Published: Mon Mar 25 2024 (03/25/2024, 09:07:40 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu: Fix a use-after-free looks like we forget to set ttm->sg to NULL. Hit panic below [ 1235.844104] general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b7b4b: 0000 [#1] SMP DEBUG_PAGEALLOC NOPTI [ 1235.989074] Call Trace: [ 1235.991751] sg_free_table+0x17/0x20 [ 1235.995667] amdgpu_ttm_backend_unbind.cold+0x4d/0xf7 [amdgpu] [ 1236.002288] amdgpu_ttm_backend_destroy+0x29/0x130 [amdgpu] [ 1236.008464] ttm_tt_destroy+0x1e/0x30 [ttm] [ 1236.013066] ttm_bo_cleanup_memtype_use+0x51/0xa0 [ttm] [ 1236.018783] ttm_bo_release+0x262/0xa50 [ttm] [ 1236.023547] ttm_bo_put+0x82/0xd0 [ttm] [ 1236.027766] amdgpu_bo_unref+0x26/0x50 [amdgpu] [ 1236.032809] amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu+0x7aa/0xd90 [amdgpu] [ 1236.040400] kfd_ioctl_alloc_memory_of_gpu+0xe2/0x330 [amdgpu] [ 1236.046912] kfd_ioctl+0x463/0x690 [amdgpu]

AI-Powered Analysis

AILast updated: 06/26/2025, 19:36:20 UTC

Technical Analysis

CVE-2021-47142 is a use-after-free vulnerability in the Linux kernel's AMD GPU driver (amdgpu), specifically within the Direct Rendering Manager (DRM) subsystem. The flaw arises from improper handling of the scatter-gather table pointer (ttm->sg) during buffer object lifecycle management. The vulnerability occurs because the pointer is not set to NULL after freeing, leading to a potential use-after-free condition. This can cause a general protection fault and kernel panic, as evidenced by the kernel log trace provided. The affected functions include sg_free_table, amdgpu_ttm_backend_unbind, amdgpu_ttm_backend_destroy, and related memory management routines in the ttm (Translation Table Maps) and amdgpu modules. Exploiting this vulnerability could allow a local attacker with access to the GPU driver interfaces to trigger a denial of service by crashing the kernel or potentially escalate privileges if further exploitation is possible. The vulnerability affects specific Linux kernel versions identified by the commit hash 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2. No known exploits are reported in the wild as of the publication date (March 25, 2024), and no CVSS score has been assigned yet. The patch involves ensuring the ttm->sg pointer is properly nullified after freeing to prevent use-after-free access.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to systems running vulnerable Linux kernel versions with AMD GPU drivers enabled. The impact includes potential denial of service through kernel panics, which can disrupt critical services, especially in environments relying on GPU-accelerated computing such as scientific research, financial modeling, or media processing. In multi-tenant or shared environments, a local attacker could exploit this flaw to destabilize systems or attempt privilege escalation, threatening confidentiality and integrity. Given the widespread use of Linux in servers, workstations, and embedded devices across Europe, the vulnerability could affect a broad range of sectors including government, finance, healthcare, and manufacturing. The lack of known exploits reduces immediate risk, but the presence of a kernel-level use-after-free bug demands prompt remediation to avoid future exploitation. Systems with AMD GPUs used in high-performance computing or graphical workloads are particularly at risk.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernels to versions that include the patch for CVE-2021-47142. Specifically, ensure that the Linux kernel is updated beyond the commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 or apply vendor-provided patches. System administrators should audit systems for the presence of AMD GPUs and verify driver versions. Where immediate patching is not feasible, consider restricting access to GPU driver interfaces to trusted users only, minimizing local attack surface. Employ kernel lockdown features and mandatory access controls (e.g., SELinux, AppArmor) to limit unauthorized interactions with kernel modules. Monitor system logs for signs of kernel panics or GPU driver errors that may indicate attempted exploitation. For critical infrastructure, implement redundancy and failover mechanisms to mitigate denial of service impacts. Finally, maintain up-to-date inventory and vulnerability management processes to track affected systems and ensure timely patch deployment.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-03-04T18:12:48.842Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9834c4522896dcbe9e7a

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

Last enriched: 6/26/2025, 7:36:20 PM

Last updated: 8/12/2025, 3:54:08 AM

Views: 13

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