Skip to main content

CVE-2023-52738: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2023-52738cvecve-2023-52738
Published: Tue May 21 2024 (05/21/2024, 15:23:01 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu/fence: Fix oops due to non-matching drm_sched init/fini Currently amdgpu calls drm_sched_fini() from the fence driver sw fini routine - such function is expected to be called only after the respective init function - drm_sched_init() - was executed successfully. Happens that we faced a driver probe failure in the Steam Deck recently, and the function drm_sched_fini() was called even without its counter-part had been previously called, causing the following oops: amdgpu: probe of 0000:04:00.0 failed with error -110 BUG: kernel NULL pointer dereference, address: 0000000000000090 PGD 0 P4D 0 Oops: 0002 [#1] PREEMPT SMP NOPTI CPU: 0 PID: 609 Comm: systemd-udevd Not tainted 6.2.0-rc3-gpiccoli #338 Hardware name: Valve Jupiter/Jupiter, BIOS F7A0113 11/04/2022 RIP: 0010:drm_sched_fini+0x84/0xa0 [gpu_sched] [...] Call Trace: <TASK> amdgpu_fence_driver_sw_fini+0xc8/0xd0 [amdgpu] amdgpu_device_fini_sw+0x2b/0x3b0 [amdgpu] amdgpu_driver_release_kms+0x16/0x30 [amdgpu] devm_drm_dev_init_release+0x49/0x70 [...] To prevent that, check if the drm_sched was properly initialized for a given ring before calling its fini counter-part. Notice ideally we'd use sched.ready for that; such field is set as the latest thing on drm_sched_init(). But amdgpu seems to "override" the meaning of such field - in the above oops for example, it was a GFX ring causing the crash, and the sched.ready field was set to true in the ring init routine, regardless of the state of the DRM scheduler. Hence, we ended-up using sched.ops as per Christian's suggestion [0], and also removed the no_scheduler check [1]. [0] https://lore.kernel.org/amd-gfx/984ee981-2906-0eaf-ccec-9f80975cb136@amd.com/ [1] https://lore.kernel.org/amd-gfx/cd0e2994-f85f-d837-609f-7056d5fb7231@amd.com/

AI-Powered Analysis

AILast updated: 06/28/2025, 01:27:43 UTC

Technical Analysis

CVE-2023-52738 is a medium-severity vulnerability in the Linux kernel's AMDGPU driver, specifically within the Direct Rendering Manager (DRM) subsystem's fence driver. The issue arises from improper handling of the drm_sched_fini() function call during driver shutdown or failure scenarios. Normally, drm_sched_fini() should only be called if the corresponding drm_sched_init() initialization was successful. However, in certain cases such as a driver probe failure (notably observed on Valve's Steam Deck hardware), drm_sched_fini() was invoked without a prior successful initialization, leading to a NULL pointer dereference and kernel oops (crash). This occurs because the AMDGPU driver incorrectly assumes the scheduler was initialized based on the sched.ready flag, which it overrides and sets prematurely, causing the cleanup function to operate on uninitialized data structures. The fix involves adding a check to ensure drm_sched was properly initialized before calling drm_sched_fini(), using the presence of sched.ops as a reliable indicator rather than sched.ready. This prevents kernel crashes during device initialization failures. The vulnerability affects Linux kernel versions containing the specified commits prior to the fix and can cause denial of service by crashing the kernel when the AMDGPU driver fails to initialize properly. The CVSS score is 5.3 (medium), reflecting a network-exploitable issue that requires no privileges or user interaction but only impacts availability without compromising confidentiality or integrity. No known exploits are currently reported in the wild.

Potential Impact

For European organizations, this vulnerability primarily poses a risk of denial-of-service (DoS) conditions on systems running vulnerable Linux kernels with AMDGPU drivers, especially those using AMD graphics hardware. Systems such as developer workstations, servers with AMD GPUs, or specialized devices like the Steam Deck could experience kernel crashes leading to system instability or downtime. While the vulnerability does not allow code execution or data compromise, repeated crashes could disrupt critical operations, particularly in environments relying on AMD GPUs for compute or graphical workloads. Organizations using Linux-based embedded devices or workstations with AMD GPUs should be aware of potential service interruptions. The impact is more pronounced in sectors with high reliance on Linux AMDGPU hardware, such as gaming, media production, scientific computing, and certain industrial applications. However, the lack of privilege requirements and user interaction lowers the risk of targeted exploitation, making widespread attacks less likely but still a concern for system reliability.

Mitigation Recommendations

European organizations should promptly update their Linux kernels to versions containing the fix for CVE-2023-52738. Specifically, ensure that the AMDGPU driver in use includes the patch that adds checks before calling drm_sched_fini(). For systems where immediate kernel updates are not feasible, consider the following mitigations: 1) Disable or blacklist the AMDGPU driver if AMD GPU hardware is not critical to operations, to prevent the vulnerable code path from executing. 2) Monitor system logs for kernel oops or AMDGPU probe failures to detect potential triggering of this vulnerability. 3) Implement robust system monitoring and automated reboot mechanisms to recover from unexpected kernel crashes. 4) For critical systems, test kernel updates in staging environments to ensure compatibility and stability before deployment. 5) Engage with hardware vendors and Linux distribution maintainers to receive timely patches and advisories. These steps go beyond generic advice by focusing on driver-specific controls, proactive monitoring, and operational continuity planning.

Need more detailed analysis?Get Pro

Technical Details

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

Threat ID: 682d9821c4522896dcbdd822

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

Last enriched: 6/28/2025, 1:27:43 AM

Last updated: 8/3/2025, 8:58:27 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