Skip to main content

CVE-2024-50177: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-50177cvecve-2024-50177
Published: Fri Nov 08 2024 (11/08/2024, 05:23:59 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: drm/amd/display: fix a UBSAN warning in DML2.1 When programming phantom pipe, since cursor_width is explicity set to 0, this causes calculation logic to trigger overflow for an unsigned int triggering the kernel's UBSAN check as below: [ 40.962845] UBSAN: shift-out-of-bounds in /tmp/amd.EfpumTkO/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c:3312:34 [ 40.962849] shift exponent 4294967170 is too large for 32-bit type 'unsigned int' [ 40.962852] CPU: 1 PID: 1670 Comm: gnome-shell Tainted: G W OE 6.5.0-41-generic #41~22.04.2-Ubuntu [ 40.962854] Hardware name: Gigabyte Technology Co., Ltd. X670E AORUS PRO X/X670E AORUS PRO X, BIOS F21 01/10/2024 [ 40.962856] Call Trace: [ 40.962857] <TASK> [ 40.962860] dump_stack_lvl+0x48/0x70 [ 40.962870] dump_stack+0x10/0x20 [ 40.962872] __ubsan_handle_shift_out_of_bounds+0x1ac/0x360 [ 40.962878] calculate_cursor_req_attributes.cold+0x1b/0x28 [amdgpu] [ 40.963099] dml_core_mode_support+0x6b91/0x16bc0 [amdgpu] [ 40.963327] ? srso_alias_return_thunk+0x5/0x7f [ 40.963331] ? CalculateWatermarksMALLUseAndDRAMSpeedChangeSupport+0x18b8/0x2790 [amdgpu] [ 40.963534] ? srso_alias_return_thunk+0x5/0x7f [ 40.963536] ? dml_core_mode_support+0xb3db/0x16bc0 [amdgpu] [ 40.963730] dml2_core_calcs_mode_support_ex+0x2c/0x90 [amdgpu] [ 40.963906] ? srso_alias_return_thunk+0x5/0x7f [ 40.963909] ? dml2_core_calcs_mode_support_ex+0x2c/0x90 [amdgpu] [ 40.964078] core_dcn4_mode_support+0x72/0xbf0 [amdgpu] [ 40.964247] dml2_top_optimization_perform_optimization_phase+0x1d3/0x2a0 [amdgpu] [ 40.964420] dml2_build_mode_programming+0x23d/0x750 [amdgpu] [ 40.964587] dml21_validate+0x274/0x770 [amdgpu] [ 40.964761] ? srso_alias_return_thunk+0x5/0x7f [ 40.964763] ? resource_append_dpp_pipes_for_plane_composition+0x27c/0x3b0 [amdgpu] [ 40.964942] dml2_validate+0x504/0x750 [amdgpu] [ 40.965117] ? dml21_copy+0x95/0xb0 [amdgpu] [ 40.965291] ? srso_alias_return_thunk+0x5/0x7f [ 40.965295] dcn401_validate_bandwidth+0x4e/0x70 [amdgpu] [ 40.965491] update_planes_and_stream_state+0x38d/0x5c0 [amdgpu] [ 40.965672] update_planes_and_stream_v3+0x52/0x1e0 [amdgpu] [ 40.965845] ? srso_alias_return_thunk+0x5/0x7f [ 40.965849] dc_update_planes_and_stream+0x71/0xb0 [amdgpu] Fix this by adding a guard for checking cursor width before triggering the size calculation.

AI-Powered Analysis

AILast updated: 06/28/2025, 12:27:34 UTC

Technical Analysis

CVE-2024-50177 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 issue arises in the display management logic, particularly in the DML2.1 (Display Mode Library) calculations. The vulnerability is caused by an unchecked calculation involving the cursor_width parameter, which is explicitly set to zero when programming a phantom pipe. This leads to an arithmetic overflow in an unsigned integer shift operation, triggering the kernel's Undefined Behavior Sanitizer (UBSAN) check. The overflow occurs because the shift exponent becomes excessively large (4294967170), which is invalid for a 32-bit unsigned integer type. This results in a kernel warning and potential instability or crash of the affected system. The root cause is a missing guard condition to verify cursor_width before performing size calculations in the amdgpu driver's display pipeline code. The vulnerability was fixed by adding a guard to prevent the overflow condition. The issue affects Linux kernel versions including the commit 70839da6360500a82e4d5f78499284474cbed7c1 and is present in kernel version 6.5.0-41-generic as per the example log. No known exploits are reported in the wild at this time, and no CVSS score has been assigned yet. The vulnerability primarily impacts systems running Linux with AMD GPUs using the affected amdgpu driver, potentially causing kernel crashes or denial of service due to the UBSAN-triggered fault during display mode programming.

Potential Impact

For European organizations, this vulnerability could lead to system instability or denial of service on Linux-based systems equipped with AMD GPUs, particularly those using the affected kernel versions. This may affect workstations, servers, or embedded devices relying on AMD graphics hardware for display output. The impact is mainly on availability, as the kernel UBSAN warning indicates a runtime fault that could cause kernel panics or crashes, disrupting business operations. Confidentiality and integrity impacts are less likely since the vulnerability is a logic error causing overflow rather than a direct code execution or privilege escalation flaw. However, any disruption in critical systems, such as those used in industrial control, media production, or scientific computing, could have operational consequences. European organizations with large deployments of Linux systems running AMD GPUs, especially those using Ubuntu 22.04 LTS or similar distributions with kernel 6.5 or later, are at risk. The lack of known exploits reduces immediate threat but patching is recommended to prevent potential future exploitation or accidental system crashes.

Mitigation Recommendations

1. Apply the latest Linux kernel updates that include the fix for CVE-2024-50177 as soon as they become available from your distribution vendor. For Ubuntu users, monitor and install kernel updates for versions 6.5.0-41-generic or later that address this issue. 2. For environments where immediate patching is not possible, consider temporarily disabling or avoiding workloads that heavily utilize AMD GPU display features or phantom pipe programming to reduce exposure. 3. Monitor system logs for UBSAN warnings or kernel messages related to amdgpu and drm subsystems to detect any attempts to trigger this vulnerability. 4. Engage with hardware and software vendors to confirm compatibility and support for patched kernels, ensuring that AMD GPU drivers are up to date. 5. Implement robust system monitoring and automated reboot or failover mechanisms to minimize downtime if kernel crashes occur. 6. For critical systems, consider testing kernel updates in staging environments to validate stability before production deployment.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-10-21T19:36:19.964Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9823c4522896dcbdf3d9

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

Last enriched: 6/28/2025, 12:27:34 PM

Last updated: 8/13/2025, 6:45:47 PM

Views: 16

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