Re: [PATCH net v2] net: hamradio: 6pack: fix uninit-value in sixpack_receive_buf

Simon Horman <[email protected]> Tue, 7 Apr 2026 17:50:07 +0100
Newsgroups org.kernel.vger.linux-hams,org.kernel.vger.netdev
Message-ID <[email protected]>
On Sat, Apr 04, 2026 at 06:03:50PM +0800, Mashiro Chen wrote:
> sixpack_receive_buf() does not properly skip bytes with TTY error flags.
> The while loop iterates through the flags buffer but never advances the
> data pointer (cp), and passes the original count including error bytes
> to sixpack_decode(). This causes sixpack_decode() to process bytes that
> should have been skipped due to TTY errors.
> 
> Fix this by processing bytes one at a time, advancing cp on each
> iteration, and only passing non-error bytes to sixpack_decode().
> This matches the pattern used by slip_receive_buf() and
> mkiss_receive_buf() for the same purpose.
> 
> Reported-by: [email protected]
> Closes: https://syzkaller.appspot.com/bug?extid=ecdb8c9878a81eb21e54
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Suggested-by: Simon Horman <[email protected]>

FWIIW, I don't think my suggested by tag is strictly necessary here:
I just suggested a minor tweak, not the idea the patch implements

> Signed-off-by: Mashiro Chen <[email protected]>

Sorry for not noticing this earlier, but AI generated review flags
that while this change looks correct, it's not clear how it relates
to the sysbot report: IOW, how is it that bytes with TTY error flags
may be uninitialized?

...