wifi: carl9170: bound memcpy length in cmd callback to prevent OOB read
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a84fab3cbfdc427e7d366f1cc844f27b2084c26c · < 9aee949c68dc6dccbc54333537b109c53fe2079f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
wifi: carl9170: bound memcpy length in cmd callback to prevent OOB read
When the firmware sends a command response with a length mismatch, carl9170_cmd_callback() logs the mismatch and calls carl9170_restart() but then falls through to memcpy(ar->readbuf, buffer + 4, len - 4). Since len comes from the firmware and can exceed ar->readlen, this copies more data than the readbuf was allocated for.
Bound the memcpy to min(len - 4, ar->readlen) so that the response is still completed -- avoiding repeated restarts from queued garbage -- while preventing an overread past the response buffer.
From the CVE record · Linux
The Linux kernel’s carl9170 Wi-Fi driver can copy beyond its allocated read buffer when firmware sends a command response with a mismatched length. This can cause an out-of-bounds memory access; the input does not establish how an attacker could trigger it or whether authentication or user interaction is required.
Engineers running Linux systems that use the carl9170 Wi-Fi driver should check their kernel versions; affected versions are not specified.