CVE-2026-139056: wifi: rtw89: cap firmware section_num before parsing
In the Linux kernel, the following vulnerability has been resolved:
wifi: rtw89: cap firmware sectionnum before parsing
rtw89fwbininfo.sectioninfo has FWDLSECTIONMAXNUM (10) entries. The v0/v1 header parsers take sectionnum from an 8-bit firmware field (0..255) and write info->sectioninfo[i] with no cap. rtw89fwdownloadsuit() keeps that object on the stack, so a crafted firmware blob overflows the stack.
Reject a truncated header and a section table that does not fit in the firmware image before reading fwhdr->sections[i].
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the rtw89 firmware parser, cap section_num at FWDL_SECTION_MAX_NUM before parsing, and reject truncated headers or section tables that do not fit in the firmware image before reading fw_hdr->sections[i].