Skip to main content

CVE-2024-57919: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-57919cvecve-2024-57919
Published: Sun Jan 19 2025 (01/19/2025, 11:52:39 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: drm/amd/display: fix divide error in DM plane scale calcs dm_get_plane_scale doesn't take into account plane scaled size equal to zero, leading to a kernel oops due to division by zero. Fix by setting out-scale size as zero when the dst size is zero, similar to what is done by drm_calc_scale(). This issue started with the introduction of cursor ovelay mode that uses this function to assess cursor mode changes via dm_crtc_get_cursor_mode() before checking plane state. [Dec17 17:14] Oops: divide error: 0000 [#1] PREEMPT SMP NOPTI [ +0.000018] CPU: 5 PID: 1660 Comm: surface-DP-1 Not tainted 6.10.0+ #231 [ +0.000007] Hardware name: Valve Jupiter/Jupiter, BIOS F7A0131 01/30/2024 [ +0.000004] RIP: 0010:dm_get_plane_scale+0x3f/0x60 [amdgpu] [ +0.000553] Code: 44 0f b7 41 3a 44 0f b7 49 3e 83 e0 0f 48 0f a3 c2 73 21 69 41 28 e8 03 00 00 31 d2 41 f7 f1 31 d2 89 06 69 41 2c e8 03 00 00 <41> f7 f0 89 07 e9 d7 d8 7e e9 44 89 c8 45 89 c1 41 89 c0 eb d4 66 [ +0.000005] RSP: 0018:ffffa8df0de6b8a0 EFLAGS: 00010246 [ +0.000006] RAX: 00000000000003e8 RBX: ffff9ac65c1f6e00 RCX: ffff9ac65d055500 [ +0.000003] RDX: 0000000000000000 RSI: ffffa8df0de6b8b0 RDI: ffffa8df0de6b8b4 [ +0.000004] RBP: ffff9ac64e7a5800 R08: 0000000000000000 R09: 0000000000000a00 [ +0.000003] R10: 00000000000000ff R11: 0000000000000054 R12: ffff9ac6d0700010 [ +0.000003] R13: ffff9ac65d054f00 R14: ffff9ac65d055500 R15: ffff9ac64e7a60a0 [ +0.000004] FS: 00007f869ea00640(0000) GS:ffff9ac970080000(0000) knlGS:0000000000000000 [ +0.000004] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ +0.000003] CR2: 000055ca701becd0 CR3: 000000010e7f2000 CR4: 0000000000350ef0 [ +0.000004] Call Trace: [ +0.000007] <TASK> [ +0.000006] ? __die_body.cold+0x19/0x27 [ +0.000009] ? die+0x2e/0x50 [ +0.000007] ? do_trap+0xca/0x110 [ +0.000007] ? do_error_trap+0x6a/0x90 [ +0.000006] ? dm_get_plane_scale+0x3f/0x60 [amdgpu] [ +0.000504] ? exc_divide_error+0x38/0x50 [ +0.000005] ? dm_get_plane_scale+0x3f/0x60 [amdgpu] [ +0.000488] ? asm_exc_divide_error+0x1a/0x20 [ +0.000011] ? dm_get_plane_scale+0x3f/0x60 [amdgpu] [ +0.000593] dm_crtc_get_cursor_mode+0x33f/0x430 [amdgpu] [ +0.000562] amdgpu_dm_atomic_check+0x2ef/0x1770 [amdgpu] [ +0.000501] drm_atomic_check_only+0x5e1/0xa30 [drm] [ +0.000047] drm_mode_atomic_ioctl+0x832/0xcb0 [drm] [ +0.000050] ? __pfx_drm_mode_atomic_ioctl+0x10/0x10 [drm] [ +0.000047] drm_ioctl_kernel+0xb3/0x100 [drm] [ +0.000062] drm_ioctl+0x27a/0x4f0 [drm] [ +0.000049] ? __pfx_drm_mode_atomic_ioctl+0x10/0x10 [drm] [ +0.000055] amdgpu_drm_ioctl+0x4e/0x90 [amdgpu] [ +0.000360] __x64_sys_ioctl+0x97/0xd0 [ +0.000010] do_syscall_64+0x82/0x190 [ +0.000008] ? __pfx_drm_mode_createblob_ioctl+0x10/0x10 [drm] [ +0.000044] ? srso_return_thunk+0x5/0x5f [ +0.000006] ? drm_ioctl_kernel+0xb3/0x100 [drm] [ +0.000040] ? srso_return_thunk+0x5/0x5f [ +0.000005] ? __check_object_size+0x50/0x220 [ +0.000007] ? srso_return_thunk+0x5/0x5f [ +0.000005] ? srso_return_thunk+0x5/0x5f [ +0.000005] ? drm_ioctl+0x2a4/0x4f0 [drm] [ +0.000039] ? __pfx_drm_mode_createblob_ioctl+0x10/0x10 [drm] [ +0.000043] ? srso_return_thunk+0x5/0x5f [ +0.000005] ? srso_return_thunk+0x5/0x5f [ +0.000005] ? __pm_runtime_suspend+0x69/0xc0 [ +0.000006] ? srso_return_thunk+0x5/0x5f [ +0.000005] ? amdgpu_drm_ioctl+0x71/0x90 [amdgpu] [ +0.000366] ? srso_return_thunk+0x5/0x5f [ +0.000006] ? syscall_exit_to_user_mode+0x77/0x210 [ +0.000007] ? srso_return_thunk+0x5/0x5f [ +0.000005] ? do_syscall_64+0x8e/0x190 [ +0.000006] ? srso_return_thunk+0x5/0x5f [ +0.000006] ? do_syscall_64+0x8e/0x190 [ +0.000006] ? srso_return_thunk+0x5/0x5f [ +0.000007] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ +0.000008] RIP: 0033:0x55bb7cd962bc [ +0.000007] Code: 4c 89 6c 24 18 4c 89 64 24 20 4c 89 74 24 28 0f 57 c0 0f 11 44 24 30 89 c7 48 8d 54 24 08 b8 10 00 00 00 be bc 64 ---truncated---

AI-Powered Analysis

AILast updated: 06/28/2025, 08:56:30 UTC

Technical Analysis

CVE-2024-57919 is a vulnerability identified in the Linux kernel, specifically within the AMD GPU driver component (amdgpu) related to the Direct Rendering Manager (DRM) subsystem. The flaw arises in the function dm_get_plane_scale, which is responsible for calculating the scaling factor of display planes. The vulnerability is due to a missing check for a zero-sized plane scaled dimension, leading to a division by zero error. This results in a kernel oops (crash) when the function attempts to divide by zero during plane scale calculations. The issue originated with the introduction of a cursor overlay mode that uses dm_get_plane_scale to assess cursor mode changes before verifying the plane state. The kernel oops trace shows the fault occurs in dm_get_plane_scale within the amdgpu driver, causing a system crash and potential denial of service. The problem is triggered when the destination size (dst size) is zero, which was not properly handled, unlike other similar functions such as drm_calc_scale. This vulnerability affects Linux kernel versions including 6.10.0+ and likely other versions incorporating the affected amdgpu driver code. While no known exploits are reported in the wild, the vulnerability can be triggered by local users or processes interacting with the DRM subsystem, particularly those with access to GPU ioctl calls. The flaw does not appear to allow privilege escalation or arbitrary code execution directly but can cause system instability and denial of service due to kernel crashes. The patch involves setting the output scale size to zero when the destination size is zero, preventing the division by zero error. This fix aligns dm_get_plane_scale behavior with drm_calc_scale and mitigates the kernel oops condition.

Potential Impact

For European organizations, the impact of CVE-2024-57919 primarily involves system availability and stability risks on Linux systems using AMD GPUs with the affected amdgpu driver. Organizations relying on Linux servers, workstations, or embedded systems with AMD graphics hardware could experience unexpected kernel crashes leading to service interruptions or downtime. This can affect critical infrastructure, cloud services, and enterprise environments where Linux is prevalent. Although the vulnerability does not directly compromise confidentiality or integrity, denial of service conditions can disrupt business operations, especially in environments requiring high availability or real-time processing. Systems running graphical workloads, virtual desktop infrastructure, or GPU-accelerated applications are more susceptible. Additionally, the vulnerability could be exploited by local users or malicious software with access to GPU ioctl interfaces to cause system crashes, potentially as part of a broader attack to degrade system reliability. The lack of remote exploitability limits the threat scope, but insider threats or compromised local accounts remain a concern. European organizations with stringent uptime requirements or those operating in sectors like finance, healthcare, or manufacturing should prioritize mitigation to avoid operational disruptions.

Mitigation Recommendations

To mitigate CVE-2024-57919, European organizations should: 1) Apply the latest Linux kernel updates that include the patch fixing the division by zero in dm_get_plane_scale. Kernel versions 6.10.0+ and later should be checked for patches related to this CVE. 2) Restrict access to GPU ioctl interfaces to trusted users and processes only, minimizing the risk of local exploitation. Implement strict access controls and monitoring on systems with AMD GPUs. 3) Employ kernel crash monitoring and automated recovery mechanisms to reduce downtime in case of unexpected kernel oops events. 4) For critical systems, consider temporarily disabling or limiting the use of cursor overlay modes or related GPU features until patches are applied. 5) Conduct thorough testing of updated kernels in staging environments to ensure stability before deployment in production. 6) Maintain up-to-date inventories of Linux systems with AMD GPUs to prioritize patching efforts. 7) Monitor security advisories from Linux kernel maintainers and AMD for any updates or additional mitigations. These steps go beyond generic advice by focusing on controlling local access to vulnerable interfaces and operational resilience.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-01-19T11:50:08.375Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9823c4522896dcbdea3c

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

Last enriched: 6/28/2025, 8:56:30 AM

Last updated: 8/11/2025, 2:57:01 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