CyberRota Analysis
AI-GeneratedThe vulnerability affects the Linux kernel's qede network driver, where an off-by-one error occurs due to missing NULL checks after memory allocation failures in the functions qede_rx_build_skb() and qede_tpa_rx_build_skb(). This oversight can lead to desynchronization of the buffer descriptor (BD) ring, potentially corrupting DMA page reference counts and causing SLUB freelist corruption. Organizations using affected Linux kernel versions, particularly those relying on the qede driver for network functionality, should prioritize applying the patch to mitigate risks associated with this vulnerability.
Original NVD Description
In the Linux kernel, the following vulnerability has been resolved: qede: fix off-by-one in BD ring consumption on build_skb failure qede_rx_build_skb() and qede_tpa_rx_build_skb() do not check for a NULL return from qede_build_skb(). When it returns NULL under memory pressure, the functions still consume a BD from the ring before returning NULL. The callers then recycle additional BDs, resulting in one extra BD being consumed (off-by-one). This desynchronizes the BD ring, which can corrupt DMA page reference counts and lead to SLUB freelist corruption. Commit 4e910dbe3650 ("qede: confirm skb is allocated before using") added a NULL check inside qede_build_skb() to prevent a NULL pointer dereference, but did not address the missing NULL checks in the callers, making this off-by-one reachable. Fix this by adding NULL checks for the return value of qede_build_skb() in both qede_rx_build_skb() and qede_tpa_rx_build_skb(), returning NULL immediately before any BD ring manipulation.