7.5high
wifi: wlcore: Return -ENOMEM instead of -EAGAIN if there is not enough headroom
- Severity
- 7.5high CVSS:3.1 by Linux
- Exploit likelihood
- 0.52% (higher than 45% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 88295a55fefe5414e64293638b6f7549646e58ed before 980f793645540ca7a6318165cc12f49d5febeb99, from cd89a4656c03f8db0c57350aaec69cd3cfaa3522 before 12f9eef39e49716c763714bfda835a733d5f6dea, from 745a0810dbc96a0471e5f5e627ba1e978c3116d4 before ceb46b40b021d21911ff8608ce4ed33c1264ad2f, from b167312390fdd461c81ead516f2b0b44e83a9edb before a6dc74209462c4fe5a88718d2f3a5286886081c8, from 71de0b6e04bbee5575caf9a1e4d424e7dcc50018 before cfa64e2b3717be1da7c4c1aff7268a009e8c1610, from 689a7980e4788e13e766763d53569fb78dea2513 before 46c670ff1ff466e5eccb3940f726586473dc053c, from e75665dd096819b1184087ba5718bd93beafff51 before f2c06d718a7b85cbc59ceaa2ff3f46b178ac709c, from e75665dd096819b1184087ba5718bd93beafff51 before deb353d9bb009638b7762cae2d0b6e8fdbb41a69 and 7 more Not affected: before 6.19, from 5.10.253 up to 5.10.*, from 5.15.203 up to 5.15.*, from 6.1.167 up to 6.1.*, from 6.6.130 up to 6.6.*, from 6.12.78 up to 6.12.* | CVE List |
| linux linux_kernel | from 5.10.250 before 5.10.253, from 5.15.200 before 5.15.203, from 6.1.163 before 6.1.167, from 6.6.124 before 6.6.130, from 6.12.70 before 6.12.78, from 6.18.10 before 6.18.20, from 6.19.1 before 6.19.10, 6.19 and 1 more | NVD |
Classification
What each source says
CVE List
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.
NVD (es)
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: wifi: wlcore: Devolver -ENOMEM en lugar de -EAGAIN si no hay suficiente espacio de cabecera (headroom) Desde el commit upstream e75665dd0968 (’wifi: wlcore: ensure skb headroom before skb_push’), wl1271_tx_allocate() y con ello wl1271_prepare_tx_frame() devuelven -EAGAIN si pskb_expand_head() falla. Sin embargo, en wlcore_tx_work_locked(), un valor de retorno de -EAGAIN de wl1271_prepare_tx_frame() se interpreta como que el búfer de agregación está lleno. Esto hace que el código vacíe el búfer, coloque el skb de nuevo al principio de la cola e intente inmediatamente el mismo skb en un bucle ’while’ ajustado. Debido a que wlcore_tx_work_locked() mantiene wl -> mutex, y el reintento ocurre inmediatamente con GFP_ATOMIC, esto resultará en un bucle infinito y un bloqueo suave de la CPU (CPU soft lockup). Devolver -ENOMEM en su lugar para que el paquete se descarte y el bucle termine. El problema fue encontrado por un agente experimental de revisión de código basado en gemini-3.1-pro mientras revisaba backports en v6.18.y.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-31552 changed 2026-08-05 | CVE Terms of Use |
| NVD | CVE-2026-31552 changed 2026-11-11 | Public domain |