wifi: mwifiex: Detach sync cmd buffer on interrupted wait
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3d026d09b28dda24777129a931634949c75a9181 · < b1bbeb8970eeb6c6bf3cd5314138103f7b69446d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
wifi: mwifiex: Detach sync cmd buffer on interrupted wait
mwifiex synchronous commands keep the caller-provided data buffer in cmd_node->data_buf. Several callers pass stack-allocated objects there.
If wait_event_interruptible_timeout() is interrupted, the caller can return and release that stack object while the firmware command is still the current command. A late firmware response then reaches the normal response handler, which can copy data through cmd_node->data_buf into the stale stack address.
This fixes a stack corruption observed during repeated association and disassociation cycles. The panic trace showed the command wait being interrupted immediately before a bad pointer dereference:
cmd_wait_q terminated: -512 Unable to handle kernel paging request at virtual address 002c583837384662 Kernel panic - not syncing: stack-protector: Kernel stack is corrupted ... Tainted: [M]=MACHINE_CHECK
The fault address decodes as little-endian ASCII:
0x002c583837384662 -> "bF878X,\0"
From the CVE record · Linux
The Linux kernel's mwifiex driver can retain a pointer to a caller's stack buffer after a synchronous command wait is interrupted or times out. A late firmware response can then write through that stale pointer and corrupt the kernel stack. The input does not establish an attacker-controlled trigger, authentication requirement, or user interaction requirement.
Engineers running Linux systems that use the mwifiex Wi-Fi driver should check their kernel versions; affected versions are not specified.