KernelScan.io

HIGH

octeontx2 RingParam Overflow

CVE-2025-71137

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.8HIGH

01

In the Linux kernel, the following vulnerability has been resolved: octeontx2-pf: fix "UBSAN: shift-out-of-bounds error" This patch ensures that the RX ring size (rx_pending) is not set below the permitted length. This avoids UBSAN shift-out-of-bounds errors when users passes small or zero ring sizes via ethtool -G.

02

Engine v0.2.0

Risk summary

A local attacker with root privileges can cause undefined behavior in the OcteonTX2 network driver by setting invalid ring sizes through ethtool, potentially leading to system instability or crashes. The impact is limited to systems with OcteonTX2 network hardware and requires administrative access.

Affecteddrivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c

Vulnerability analysis

Root Cause: The otx2_set_ringparam() function in the OcteonTX2 network driver accepts user-provided RX ring size values via ethtool without proper validation. When users pass small or zero values for rx_pending, subsequent bit shift operations (likely in Q_SIZE() macro) can cause undefined behavior due to shift-out-of-bounds conditions, triggering UBSAN errors.

Attack Surface: Local attack surface requiring root privileges to use ethtool commands. The vulnerability is triggered through the ethtool interface when configuring network ring parameters on OcteonTX2 network devices.

Fix Mechanism: The patch adds input validation to reject rx_pending values below 16, which is the minimum safe ring size. It returns -EINVAL with an error message when invalid values are provided, preventing the problematic shift operations from occurring.

03

BranchFixed inPatch commit
5.105.10.2485d8dfa3abb9a
5.155.15.1984cc4cfe4d23c
6.16.1.160658caf3b8aad
6.126.12.64aa743b0d9844
6.186.18.4442848e457f5
6.66.6.120b23a2e155894
mainline6.1985f4b0c650d9