Skip to main content

CVE-2024-50146: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-50146cvecve-2024-50146
Published: Thu Nov 07 2024 (11/07/2024, 09:31:23 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: net/mlx5e: Don't call cleanup on profile rollback failure When profile rollback fails in mlx5e_netdev_change_profile, the netdev profile var is left set to NULL. Avoid a crash when unloading the driver by not calling profile->cleanup in such a case. This was encountered while testing, with the original trigger that the wq rescuer thread creation got interrupted (presumably due to Ctrl+C-ing modprobe), which gets converted to ENOMEM (-12) by mlx5e_priv_init, the profile rollback also fails for the same reason (signal still active) so the profile is left as NULL, leading to a crash later in _mlx5e_remove. [ 732.473932] mlx5_core 0000:08:00.1: E-Switch: Unload vfs: mode(OFFLOADS), nvfs(2), necvfs(0), active vports(2) [ 734.525513] workqueue: Failed to create a rescuer kthread for wq "mlx5e": -EINTR [ 734.557372] mlx5_core 0000:08:00.1: mlx5e_netdev_init_profile:6235:(pid 6086): mlx5e_priv_init failed, err=-12 [ 734.559187] mlx5_core 0000:08:00.1 eth3: mlx5e_netdev_change_profile: new profile init failed, -12 [ 734.560153] workqueue: Failed to create a rescuer kthread for wq "mlx5e": -EINTR [ 734.589378] mlx5_core 0000:08:00.1: mlx5e_netdev_init_profile:6235:(pid 6086): mlx5e_priv_init failed, err=-12 [ 734.591136] mlx5_core 0000:08:00.1 eth3: mlx5e_netdev_change_profile: failed to rollback to orig profile, -12 [ 745.537492] BUG: kernel NULL pointer dereference, address: 0000000000000008 [ 745.538222] #PF: supervisor read access in kernel mode <snipped> [ 745.551290] Call Trace: [ 745.551590] <TASK> [ 745.551866] ? __die+0x20/0x60 [ 745.552218] ? page_fault_oops+0x150/0x400 [ 745.555307] ? exc_page_fault+0x79/0x240 [ 745.555729] ? asm_exc_page_fault+0x22/0x30 [ 745.556166] ? mlx5e_remove+0x6b/0xb0 [mlx5_core] [ 745.556698] auxiliary_bus_remove+0x18/0x30 [ 745.557134] device_release_driver_internal+0x1df/0x240 [ 745.557654] bus_remove_device+0xd7/0x140 [ 745.558075] device_del+0x15b/0x3c0 [ 745.558456] mlx5_rescan_drivers_locked.part.0+0xb1/0x2f0 [mlx5_core] [ 745.559112] mlx5_unregister_device+0x34/0x50 [mlx5_core] [ 745.559686] mlx5_uninit_one+0x46/0xf0 [mlx5_core] [ 745.560203] remove_one+0x4e/0xd0 [mlx5_core] [ 745.560694] pci_device_remove+0x39/0xa0 [ 745.561112] device_release_driver_internal+0x1df/0x240 [ 745.561631] driver_detach+0x47/0x90 [ 745.562022] bus_remove_driver+0x84/0x100 [ 745.562444] pci_unregister_driver+0x3b/0x90 [ 745.562890] mlx5_cleanup+0xc/0x1b [mlx5_core] [ 745.563415] __x64_sys_delete_module+0x14d/0x2f0 [ 745.563886] ? kmem_cache_free+0x1b0/0x460 [ 745.564313] ? lockdep_hardirqs_on_prepare+0xe2/0x190 [ 745.564825] do_syscall_64+0x6d/0x140 [ 745.565223] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 745.565725] RIP: 0033:0x7f1579b1288b

AI-Powered Analysis

AILast updated: 06/28/2025, 17:54:51 UTC

Technical Analysis

CVE-2024-50146 is a vulnerability identified in the Linux kernel's mlx5e network driver, which is part of the Mellanox (now NVIDIA) mlx5 core driver stack used for high-performance network interface cards (NICs). The flaw arises in the error handling logic during the rollback of network device profile changes in the mlx5e_netdev_change_profile function. Specifically, when a profile rollback fails—such as when the workqueue rescuer thread creation is interrupted (e.g., by a signal like Ctrl+C during module loading)—the netdev profile pointer is left set to NULL. Subsequently, during driver unload or device removal, the driver attempts to call the cleanup function on this NULL profile pointer, leading to a NULL pointer dereference and kernel crash (kernel oops). The crash is triggered by a NULL pointer dereference at a low memory address (0x8), as evidenced by the kernel logs and call trace provided. This vulnerability is a result of improper error handling and cleanup sequencing in the mlx5e driver, which can cause system instability or denial of service (DoS) conditions when the driver is unloaded or the device is removed under error conditions. The issue was discovered during testing scenarios involving interrupted module loading and has been addressed by ensuring that cleanup is not called on a NULL profile pointer during rollback failure. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, particularly those relying on Linux servers with Mellanox/NVIDIA mlx5-based NICs—common in data centers, cloud infrastructure, and high-performance computing environments—this vulnerability poses a risk of system crashes and denial of service. The impact is primarily on availability, as a kernel crash can disrupt network connectivity and server operations. This can affect critical services, including web hosting, cloud platforms, and enterprise applications. While the vulnerability requires specific conditions (interrupted module loading or device removal under error states), it could be triggered during maintenance or automated driver reloads, potentially causing unexpected downtime. Confidentiality and integrity impacts are minimal since this is not a remote code execution or privilege escalation flaw. However, the resulting instability could be exploited as part of a broader attack chain to disrupt services. Organizations with high uptime requirements or those operating critical infrastructure should be particularly cautious. The vulnerability's impact is more pronounced in environments where mlx5e drivers are actively managed or updated, such as in virtualized or containerized deployments where network devices are frequently reconfigured.

Mitigation Recommendations

1. Apply the official Linux kernel patches that address this issue as soon as they become available to ensure proper error handling in the mlx5e driver. 2. Until patches are applied, avoid interrupting module loading or unloading processes for mlx5e drivers to reduce the risk of triggering the rollback failure. 3. Implement robust monitoring of kernel logs for mlx5e-related errors or crashes to detect early signs of this issue. 4. In environments using automated orchestration or configuration management, add safeguards to prevent abrupt termination of driver reloads or device removals. 5. Consider scheduling maintenance windows for driver updates to minimize impact and ensure controlled conditions during module operations. 6. For critical systems, maintain redundant network paths or failover mechanisms to mitigate availability loss in case of driver crashes. 7. Engage with hardware vendors (e.g., NVIDIA) for updated firmware or driver recommendations that may further harden the mlx5e driver stack. 8. Conduct thorough testing of driver updates in staging environments replicating production conditions to identify potential rollback failures before deployment.

Need more detailed analysis?Get Pro

Technical Details

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

Threat ID: 682d9825c4522896dcbe00c0

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

Last enriched: 6/28/2025, 5:54:51 PM

Last updated: 8/2/2025, 12:47:09 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