CVE-2026-98237: net: wwan: mhi_wwan_mbim: guard against a cyclic NDP chain
In the Linux kernel, the following vulnerability has been resolved:
net: wwan: mhiwwanmbim: guard against a cyclic NDP chain
The NDP traversal in mhimbimrx() only stops when wNextNdpIndex is zero. Nothing requires the offsets to advance, so a modem that points an NDP at itself, or at an earlier NDP, keeps the loop spinning forever on one CPU.
Break out when the next NDP offset is not larger than the current one.
Verified in a QEMU guest with a fault injector feeding the driver's receive callback an NTB whose single NDP points at itself: the unpatched driver spins in mhimbimrx() with one CPU pinned at 100% and the thread never returns. With this check the loop terminates within one iteration.
Changes in v2: move the non-increasing check to the wNextNdpIndex retrieval site, as suggested by Loic Poulain, instead of tracking the previous offset in a separate variable.