From: Mashiro Chen <mashiro.chen@mailbox.org>
To: horms@kernel.org
Cc: netdev@vger.kernel.org, linux-hams@vger.kernel.org
Subject: Re: [PATCH] net: hamradio: 6pack: fix uninit-value in sixpack_receive_buf
Date: Wed, 8 Apr 2026 01:30:34 +0800 [thread overview]
Message-ID: <20260407173034.107268-1-mashiro.chen@mailbox.org> (raw)
In-Reply-To: <20260407165007.GB469338@kernel.org>
On Wed, Apr 08, 2026, Simon Horman wrote:
> 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?
Thanks for the question, and for the earlier review.
The TTY receive_buf() contract is that for positions where fp[i] != 0
(error flag set), the caller must discard cp[i] -- the TTY driver does
not guarantee a meaningful value there. In syzbot's fuzzing harness
(pty/ldisc injection), the fuzzer allocates a tty_buffer, sets error
flags on certain byte positions, but leaves the corresponding entries in
the char buffer uninitialized. KMSAN then detects that sixpack_decode()
reads those uninitialized bytes.
slip_receive_buf() and mkiss_receive_buf() already handle this correctly
by advancing their char pointer past error-flagged bytes before calling
their decode functions. sixpack_receive_buf() had the same structure
but cp was never advanced, so the full original buffer -- including the
uninit error-flagged positions -- was forwarded to sixpack_decode().
I have also dropped the Suggested-by tag per your note, and submitted
a v2 with the commit message expanded to explain the uninit-value
connection more clearly.
Thanks,
Mashiro Chen
next prev parent reply other threads:[~2026-04-07 17:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-02 16:45 [PATCH net] net: hamradio: 6pack: fix uninit-value in sixpack_receive_buf Mashiro Chen
2026-04-04 8:56 ` Simon Horman
2026-04-04 10:03 ` [PATCH net v2] " Mashiro Chen
2026-04-07 16:50 ` Simon Horman
2026-04-07 17:30 ` Mashiro Chen [this message]
2026-04-07 17:31 ` [PATCH " Mashiro Chen
2026-04-04 8:57 ` [PATCH net] " Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260407173034.107268-1-mashiro.chen@mailbox.org \
--to=mashiro.chen@mailbox.org \
--cc=horms@kernel.org \
--cc=linux-hams@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox