Re: [PATCH] net: lapb: fix uninitialized stack frame fields in lapb_decode()
From: Martin Schiller
Date: Mon Nov 23 2026 - 13:18:56 EST
On Wed, 23 Sep 2026 20:36:52 +0200, netdev-bot wrote:
> - [Medium] The second justification in the commit message is factually
> wrong.
> - [Medium] The patch bundles an orthogonal receive-path acceptance-policy
> change into what is presented as an uninitialized-memory fix.
I agree with both points. frame->cr is really left uninitialized for
an unexpected address byte, and it is used by lapb_check_need_response()
and lapb_transmit_frmr(), so zeroing the frame is the right fix for
net. control[1], however, is always set in extended mode and never sent
in standard mode.
Hui, please send a v2 for net, as a new thread with [PATCH net v2] in
the subject, that only adds the memset() and describes this effect,
including how you found the issue. Please drop the Assisted-by: line;
checkpatch rejects it, and tool details can go below the "---" line.
Rejecting frames with an unexpected address byte is a separate
behavioural change: such frames are then dropped silently, and a peer
with a mismatching configuration can no longer bring the link up.
Discarding them matches ISO 7776, as the review notes, so I'm open to
that as a separate patch for net-next, with the consequence spelled out
in the commit message and ideally a lapb_dbg() message for the dropped
frame.