Skip to main content

CVE-2023-52817: Vulnerability in Linux Linux

High
VulnerabilityCVE-2023-52817cvecve-2023-52817
Published: Tue May 21 2024 (05/21/2024, 15:31:24 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu: Fix a null pointer access when the smc_rreg pointer is NULL In certain types of chips, such as VEGA20, reading the amdgpu_regs_smc file could result in an abnormal null pointer access when the smc_rreg pointer is NULL. Below are the steps to reproduce this issue and the corresponding exception log: 1. Navigate to the directory: /sys/kernel/debug/dri/0 2. Execute command: cat amdgpu_regs_smc 3. Exception Log:: [4005007.702554] BUG: kernel NULL pointer dereference, address: 0000000000000000 [4005007.702562] #PF: supervisor instruction fetch in kernel mode [4005007.702567] #PF: error_code(0x0010) - not-present page [4005007.702570] PGD 0 P4D 0 [4005007.702576] Oops: 0010 [#1] SMP NOPTI [4005007.702581] CPU: 4 PID: 62563 Comm: cat Tainted: G OE 5.15.0-43-generic #46-Ubunt u [4005007.702590] RIP: 0010:0x0 [4005007.702598] Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6. [4005007.702600] RSP: 0018:ffffa82b46d27da0 EFLAGS: 00010206 [4005007.702605] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffa82b46d27e68 [4005007.702609] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff9940656e0000 [4005007.702612] RBP: ffffa82b46d27dd8 R08: 0000000000000000 R09: ffff994060c07980 [4005007.702615] R10: 0000000000020000 R11: 0000000000000000 R12: 00007f5e06753000 [4005007.702618] R13: ffff9940656e0000 R14: ffffa82b46d27e68 R15: 00007f5e06753000 [4005007.702622] FS: 00007f5e0755b740(0000) GS:ffff99479d300000(0000) knlGS:0000000000000000 [4005007.702626] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [4005007.702629] CR2: ffffffffffffffd6 CR3: 00000003253fc000 CR4: 00000000003506e0 [4005007.702633] Call Trace: [4005007.702636] <TASK> [4005007.702640] amdgpu_debugfs_regs_smc_read+0xb0/0x120 [amdgpu] [4005007.703002] full_proxy_read+0x5c/0x80 [4005007.703011] vfs_read+0x9f/0x1a0 [4005007.703019] ksys_read+0x67/0xe0 [4005007.703023] __x64_sys_read+0x19/0x20 [4005007.703028] do_syscall_64+0x5c/0xc0 [4005007.703034] ? do_user_addr_fault+0x1e3/0x670 [4005007.703040] ? exit_to_user_mode_prepare+0x37/0xb0 [4005007.703047] ? irqentry_exit_to_user_mode+0x9/0x20 [4005007.703052] ? irqentry_exit+0x19/0x30 [4005007.703057] ? exc_page_fault+0x89/0x160 [4005007.703062] ? asm_exc_page_fault+0x8/0x30 [4005007.703068] entry_SYSCALL_64_after_hwframe+0x44/0xae [4005007.703075] RIP: 0033:0x7f5e07672992 [4005007.703079] Code: c0 e9 b2 fe ff ff 50 48 8d 3d fa b2 0c 00 e8 c5 1d 02 00 0f 1f 44 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 0f 05 <48> 3d 00 f0 ff ff 77 56 c3 0f 1f 44 00 00 48 83 e c 28 48 89 54 24 [4005007.703083] RSP: 002b:00007ffe03097898 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [4005007.703088] RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007f5e07672992 [4005007.703091] RDX: 0000000000020000 RSI: 00007f5e06753000 RDI: 0000000000000003 [4005007.703094] RBP: 00007f5e06753000 R08: 00007f5e06752010 R09: 00007f5e06752010 [4005007.703096] R10: 0000000000000022 R11: 0000000000000246 R12: 0000000000022000 [4005007.703099] R13: 0000000000000003 R14: 0000000000020000 R15: 0000000000020000 [4005007.703105] </TASK> [4005007.703107] Modules linked in: nf_tables libcrc32c nfnetlink algif_hash af_alg binfmt_misc nls_ iso8859_1 ipmi_ssif ast intel_rapl_msr intel_rapl_common drm_vram_helper drm_ttm_helper amd64_edac t tm edac_mce_amd kvm_amd ccp mac_hid k10temp kvm acpi_ipmi ipmi_si rapl sch_fq_codel ipmi_devintf ipm i_msghandler msr parport_pc ppdev lp parport mtd pstore_blk efi_pstore ramoops pstore_zone reed_solo mon ip_tables x_tables autofs4 ib_uverbs ib_core amdgpu(OE) amddrm_ttm_helper(OE) amdttm(OE) iommu_v 2 amd_sched(OE) amdkcl(OE) drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cec rc_core drm igb ahci xhci_pci libahci i2c_piix4 i2c_algo_bit xhci_pci_renesas dca [4005007.703184] CR2: 0000000000000000 [4005007.703188] ---[ en ---truncated---

AI-Powered Analysis

AILast updated: 07/03/2025, 03:57:40 UTC

Technical Analysis

CVE-2023-52817 is a high-severity vulnerability in the Linux kernel's AMDGPU driver, specifically affecting certain AMD GPU chips such as VEGA20. The flaw arises from a null pointer dereference in the drm/amdgpu component when the smc_rreg pointer is NULL. This occurs during the reading of the amdgpu_regs_smc debugfs file located at /sys/kernel/debug/dri/0. When accessed, the kernel attempts to dereference a NULL pointer, leading to a kernel oops and potential system crash. The vulnerability is triggered by a simple read operation (e.g., 'cat amdgpu_regs_smc'), which causes a null pointer access and an exception in kernel mode. The detailed kernel logs show a page fault (#PF) due to an invalid memory access at address 0x0, indicating a NULL pointer dereference. This vulnerability is classified under CWE-476 (NULL Pointer Dereference). The CVSS v3.1 score is 8.4 (high), with vector AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, indicating that the attack vector is local, requires low attack complexity, no privileges, and no user interaction, and impacts confidentiality, integrity, and availability to a high degree. Although exploitation requires local access, the impact is severe because it can cause a denial of service via kernel crash and potentially allow privilege escalation or arbitrary code execution due to kernel memory corruption. The vulnerability affects specific Linux kernel versions containing the vulnerable AMDGPU driver code. No known exploits are currently reported in the wild, but the vulnerability is publicly disclosed and patched in recent kernel updates. The root cause is insufficient validation of the smc_rreg pointer before dereferencing it in the debugfs read handler for AMDGPU registers.

Potential Impact

For European organizations, this vulnerability poses a significant risk primarily to systems running Linux kernels with the vulnerable AMDGPU driver and equipped with affected AMD GPUs such as VEGA20. The impact includes potential denial of service due to kernel crashes, which can disrupt critical services and operations. Furthermore, the vulnerability could be leveraged for privilege escalation or arbitrary code execution within the kernel context, threatening system confidentiality and integrity. Organizations relying on Linux-based infrastructure for servers, workstations, or embedded systems with AMD GPUs are at risk. This includes sectors such as finance, healthcare, manufacturing, and government agencies where Linux is prevalent. The local attack vector means that attackers need some form of local access, which could be obtained via compromised user accounts or insider threats. The high severity and potential for system instability or compromise make timely patching essential. Additionally, disruption caused by kernel panics could affect high-availability systems and critical infrastructure, leading to operational downtime and financial loss.

Mitigation Recommendations

1. Immediate application of the latest Linux kernel patches that address CVE-2023-52817 is the primary mitigation step. Organizations should update their Linux distributions to versions containing the fix for the AMDGPU driver null pointer dereference. 2. Restrict access to debugfs, especially the /sys/kernel/debug/dri/0 directory and the amdgpu_regs_smc file, to trusted and authorized users only. This can be done by mounting debugfs with appropriate permissions or disabling debugfs if not required. 3. Implement strict local user access controls and monitoring to detect and prevent unauthorized attempts to read from debugfs files. 4. Employ kernel hardening techniques such as Kernel Address Space Layout Randomization (KASLR), Kernel Page Table Isolation (KPTI), and SELinux/AppArmor policies to limit the impact of potential kernel exploits. 5. Conduct regular audits of systems with AMD GPUs to identify vulnerable kernel versions and ensure compliance with patch management policies. 6. For environments where immediate patching is not feasible, consider disabling or blacklisting the AMDGPU driver if the hardware is not in use or switching to alternative GPU drivers where possible. 7. Monitor security advisories and threat intelligence feeds for any emerging exploit attempts targeting this vulnerability to respond promptly.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-21T15:19:24.249Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9830c4522896dcbe7669

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

Last enriched: 7/3/2025, 3:57:40 AM

Last updated: 8/16/2025, 4:21:29 AM

Views: 17

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