CVE-2024-50297 in Linuxinfo

Summary

by MITRE • 11/19/2024

In the Linux kernel, the following vulnerability has been resolved:

net: xilinx: axienet: Enqueue Tx packets in dql before dmaengine starts

Enqueue packets in dql after dma engine starts causes race condition. Tx transfer starts once dma engine is started and may execute dql dequeue in completion before it gets queued. It results in following kernel crash while running iperf stress test:

kernel BUG at lib/dynamic_queue_limits.c:99!

Internal error: Oops - BUG: 00000000f2000800 [#1] SMP
pc : dql_completed+0x238/0x248 lr : dql_completed+0x3c/0x248

Call trace: dql_completed+0x238/0x248 axienet_dma_tx_cb+0xa0/0x170 xilinx_dma_do_tasklet+0xdc/0x290 tasklet_action_common+0xf8/0x11c tasklet_action+0x30/0x3c handle_softirqs+0xf8/0x230


Start dmaengine after enqueue in dql fixes the crash.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 07/16/2025

The vulnerability CVE-2024-50297 represents a critical race condition in the Xilinx Axi Ethernet driver within the Linux kernel networking subsystem. This flaw manifests specifically in the transmit packet handling mechanism where the order of operations between the dynamic queue limits (dql) subsystem and the dmaengine component creates an unpredictable execution flow that can lead to kernel crashes. The issue occurs when transmit packets are enqueued in the dql subsystem after the dmaengine has already been initiated, creating a timing window where completion callbacks can execute before proper queuing has occurred. This race condition fundamentally violates the expected synchronization between hardware DMA operations and software queue management, leading to memory access violations and system instability.

The technical root cause stems from improper sequencing of operations within the axienet driver's transmit path. When the dmaengine is started before packets are enqueued in dql, the hardware transfer process can complete immediately, triggering the dql completion callback dql_completed before the packet has been properly queued in the dynamic queue limits structure. This creates a scenario where the kernel attempts to access memory locations that have not yet been properly initialized or populated, resulting in the kernel BUG at lib/dynamic_queue_limits.c:99. The call trace reveals a clear execution path where dql_completed is invoked from axienet_dma_tx_cb, which is called by xilinx_dma_do_tasklet, ultimately leading to the softirq handling chain that terminates in the kernel oops. This pattern aligns with CWE-362, a classic race condition vulnerability where concurrent operations on shared resources are not properly synchronized.

The operational impact of this vulnerability is severe, particularly in high-throughput networking environments where stress testing with tools like iperf can expose the race condition. During normal operation, the system may appear stable, but under sustained network load, the timing window becomes exploitable, leading to kernel crashes that can bring down network connectivity and potentially compromise system stability. The vulnerability affects systems using Xilinx Axi Ethernet hardware components and is particularly dangerous in embedded systems or network appliances where kernel stability is critical. Attackers could potentially exploit this timing weakness to cause denial of service conditions or system crashes, though the attack surface is limited to systems utilizing the specific Xilinx ethernet driver implementation. The vulnerability demonstrates the importance of proper ordering in concurrent systems and highlights the risks of insufficient synchronization between hardware and software components in kernel drivers. The fix implemented by reordering operations to start the dmaengine after enqueuing packets in dql addresses the core synchronization issue and prevents the race condition from occurring, aligning with ATT&CK technique T1489 which involves creating or manipulating system processes to cause system instability or denial of service.

Responsible

Linux

Reservation

10/21/2024

Disclosure

11/19/2024

Moderation

accepted

CPE

ready

EPSS

0.00136

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!