[PATCH v2] memory: brcmstb_dpfe: validate firmware section sizes

Krzysztof Kozlowski krzk at kernel.org
Fri Sep 4 06:53:55 PDT 2026


On 15/08/2026 15:45, Pengpeng Hou wrote:
> The firmware header is read before the image has been shown to contain a
> complete header. In addition, the final size check adds two
> firmware-provided u32 section lengths before comparing the result with
> fw->size, so the addition can wrap.
> 
> Reject images shorter than the fixed header and checksum before reading
> the header. Then derive the available payload length with subtraction and
> require the two declared sections to fill it exactly.
> 
> Fixes: 2f330caff577 ("memory: brcmstb: Add driver for DPFE")
> 

There is no blank line around tags.

> Assisted-by: Codex:gpt-5

So if you ask some LLM tools, then ask them how to write correct Linux
kernel commit, please.

Applied.

Best regards,
Krzysztof



More information about the linux-arm-kernel mailing list