All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Mashiro Chen <mashiro.chen@mailbox.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, linux-hams@vger.kernel.org,
	stable@vger.kernel.org,
	syzbot+ecdb8c9878a81eb21e54@syzkaller.appspotmail.com
Subject: Re: [PATCH v2] net: hamradio: 6pack: fix uninit-value in sixpack_receive_buf
Date: Fri, 10 Apr 2026 17:13:32 +0100	[thread overview]
Message-ID: <20260410161332.GA469338@kernel.org> (raw)
In-Reply-To: <20260407173101.107352-1-mashiro.chen@mailbox.org>

On Wed, Apr 08, 2026 at 01:31:01AM +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.  The TTY layer does not
> guarantee that cp[i] holds a meaningful value when fp[i] is set, so
> passing those positions to sixpack_decode() results in KMSAN reporting
> an uninit-value read.
> 
> Fix this by processing bytes one at a time, advancing cp on each
> iteration, and only passing valid (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: syzbot+ecdb8c9878a81eb21e54@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=ecdb8c9878a81eb21e54
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Mashiro Chen <mashiro.chen@mailbox.org>

Thanks for the updates.

Reviewed-by: Simon Horman <horms@kernel.org>

  reply	other threads:[~2026-04-10 16:13 UTC|newest]

Thread overview: 9+ 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       ` [PATCH] " Mashiro Chen
2026-04-07 17:31       ` [PATCH v2] " Mashiro Chen
2026-04-10 16:13         ` Simon Horman [this message]
2026-04-10 22:30         ` patchwork-bot+netdevbpf
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=20260410161332.GA469338@kernel.org \
    --to=horms@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-hams@vger.kernel.org \
    --cc=mashiro.chen@mailbox.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=syzbot+ecdb8c9878a81eb21e54@syzkaller.appspotmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.