Thread (3 messages) 3 messages, 2 authors, 10h ago

Re: [PATCH] net: bnx2x: validate firmware section bounds without overflow

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-07-06 15:30:17
Also in: lkml

On Mon, Jul 06, 2026 at 05:34:03PM +0800, Pengpeng Hou wrote:
The firmware loader validates each section with offset + length before it
uses section offsets to read data from the firmware image. Both fields are
32-bit values from the firmware header, so the addition can wrap before it
is compared with the firmware size.

Validate sections as offset <= size and length <= size - offset instead.
Also require the firmware version section to contain the four bytes that
bnx2x_check_firmware() reads later.

Signed-off-by: Pengpeng Hou <redacted>
Please stop posting patches. I gets very frustrating having to point
out again and again the same errors.

Please work on one patch. Make all the basic errors once, on one
patch, until you get it merged. Then post the next patch, hopefully
correctly.

Please reply to all your patches with:

pw-bot: cr

so that they get dropped from the review system, so they don't waste
our time.

    Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help