CVE-2026-31552: wifi: wlcore: Return -ENOMEM instead of -EAGAIN if there is not enough headroom
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
wifi: wlcore: Return -ENOMEM instead of -EAGAIN if there is not enough headroom
Since upstream commit e75665dd0968 ("wifi: wlcore: ensure skb headroom before skb_push"), wl1271_tx_allocate() and with it wl1271_prepare_tx_frame() returns -EAGAIN if pskb_expand_head() fails. However, in wlcore_tx_work_locked(), a return value of -EAGAIN from wl1271_prepare_tx_frame() is interpreted as the aggregation buffer being full. This causes the code to flush the buffer, put the skb back at the head of the queue, and immediately retry the same skb in a tight while loop.
Because wlcore_tx_work_locked() holds wl->mutex, and the retry happens immediately with GFP_ATOMIC, this will result in an infinite loop and a CPU soft lockup. Return -ENOMEM instead so the packet is dropped and the loop terminates.
The problem was found by an experimental code review agent based on gemini-3.1-pro while reviewing backports into v6.18.y.
The Linux kernel CVE team has assigned CVE-2026-31552 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.10.250 with commit 88295a55fefe5414e64293638b6f7549646e58ed and fixed in 5.10.253 with commit 980f793645540ca7a6318165cc12f49d5febeb99 Issue introduced in 5.15.200 with commit cd89a4656c03f8db0c57350aaec69cd3cfaa3522 and fixed in 5.15.203 with commit 12f9eef39e49716c763714bfda835a733d5f6dea Issue introduced in 6.1.163 with commit 745a0810dbc96a0471e5f5e627ba1e978c3116d4 and fixed in 6.1.167 with commit ceb46b40b021d21911ff8608ce4ed33c1264ad2f Issue introduced in 6.6.124 with commit b167312390fdd461c81ead516f2b0b44e83a9edb and fixed in 6.6.130 with commit a6dc74209462c4fe5a88718d2f3a5286886081c8 Issue introduced in 6.12.70 with commit 71de0b6e04bbee5575caf9a1e4d424e7dcc50018 and fixed in 6.12.78 with commit cfa64e2b3717be1da7c4c1aff7268a009e8c1610 Issue introduced in 6.18.10 with commit 689a7980e4788e13e766763d53569fb78dea2513 and fixed in 6.18.20 with commit 46c670ff1ff466e5eccb3940f726586473dc053c Issue introduced in 6.19 with commit e75665dd096819b1184087ba5718bd93beafff51 and fixed in 6.19.10 with commit f2c06d718a7b85cbc59ceaa2ff3f46b178ac709c Issue introduced in 6.19 with commit e75665dd096819b1184087ba5718bd93beafff51 and fixed in 7.0 with commit deb353d9bb009638b7762cae2d0b6e8fdbb41a69
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-31552
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/net/wireless/ti/wlcore/tx.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/980f793645540ca7a6318165cc12f49d5febeb99 https://git.kernel.org/stable/c/12f9eef39e49716c763714bfda835a733d5f6dea https://git.kernel.org/stable/c/ceb46b40b021d21911ff8608ce4ed33c1264ad2f https://git.kernel.org/stable/c/a6dc74209462c4fe5a88718d2f3a5286886081c8 https://git.kernel.org/stable/c/cfa64e2b3717be1da7c4c1aff7268a009e8c1610 https://git.kernel.org/stable/c/46c670ff1ff466e5eccb3940f726586473dc053c https://git.kernel.org/stable/c/f2c06d718a7b85cbc59ceaa2ff3f46b178ac709c https://git.kernel.org/stable/c/deb353d9bb009638b7762cae2d0b6e8fdbb41a69