mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Kuniyuki Iwashima <kuniyu@amazon.com>,
	syzbot+b834a6b2decad004cfa1@syzkaller.appspotmail.com
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	linux-kernel@vger.kernel.org, martineau@kernel.org,
	matthieu.baerts@tessares.net, matttbe@kernel.org,
	mptcp@lists.linux.dev, netdev@vger.kernel.org,
	syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [mptcp?] KMSAN: uninit-value in mptcp_incoming_options
Date: Thu, 23 Nov 2023 09:00:57 +0100	[thread overview]
Message-ID: <193463799264cd58373df81b6e93cc4091c83ca5.camel@redhat.com> (raw)
In-Reply-To: <20231123004834.58534-1-kuniyu@amazon.com>

Hi.

On Wed, 2023-11-22 at 16:48 -0800, Kuniyuki Iwashima wrote:
> From: syzbot <syzbot+b834a6b2decad004cfa1@syzkaller.appspotmail.com>
> Date: Wed, 22 Nov 2023 07:43:23 -0800
> > Hello,
> > 
> > syzbot found the following issue on:
> > 
> > HEAD commit:    c2d5304e6c64 Merge tag 'platform-drivers-x86-v6.7-2' of gi..
> > git tree:       upstream
> > console+strace: https://syzkaller.appspot.com/x/log.txt?x=1536e3d4e80000
> > kernel config:  https://syzkaller.appspot.com/x/.config?x=e32016b84cf917ca
> > dashboard link: https://syzkaller.appspot.com/bug?extid=b834a6b2decad004cfa1
> > compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> > syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=11469724e80000
> > C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=13934aaf680000
> > 
> > Downloadable assets:
> > disk image: https://storage.googleapis.com/syzbot-assets/23ea827adf3b/disk-c2d5304e.raw.xz
> > vmlinux: https://storage.googleapis.com/syzbot-assets/0f964ac588f5/vmlinux-c2d5304e.xz
> > kernel image: https://storage.googleapis.com/syzbot-assets/b061be889285/bzImage-c2d5304e.xz
> > 
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+b834a6b2decad004cfa1@syzkaller.appspotmail.com
> > 
> > =====================================================
> > BUG: KMSAN: uninit-value in mptcp_incoming_options+0xc93/0x3a80 net/mptcp/options.c:1197
> 
> #syz test git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git c2d5304e6c648ebcf653bace7e51e0e6742e46c8
> 
> diff --git a/net/mptcp/options.c b/net/mptcp/options.c
> index cd15ec73073e..01066aa7e67d 100644
> --- a/net/mptcp/options.c
> +++ b/net/mptcp/options.c
> @@ -370,6 +370,7 @@ void mptcp_get_options(const struct sk_buff *skb,
>  
>  	/* initialize option status */
>  	mp_opt->suboptions = 0;
> +	mp_opt->use_ack = 0;
>  
>  	length = (th->doff * 4) - sizeof(struct tcphdr);
>  	ptr = (const unsigned char *)(th + 1);
> 

Thanks for the patch! AFAICS it should work, but I think the variant
proposed by Edward:

https://lore.kernel.org/netdev/tencent_B0E02F1D6C009450E8D6EC06CC6C7B5E6C0A@qq.com/

should be better, adding the additional instruction only in the code
path needing it. 

Thank!

Paolo


  parent reply	other threads:[~2023-11-23  8:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-22 15:43 syzbot
2023-11-23  0:06 ` syzbot
2023-11-23  0:48 ` Kuniyuki Iwashima
2023-11-23  1:17   ` syzbot
2023-11-23  8:00   ` Paolo Abeni [this message]
     [not found] ` <tencent_B0E02F1D6C009450E8D6EC06CC6C7B5E6C0A@qq.com>
2023-11-23 16:41   ` [PATCH] mptcp: fix " Paolo Abeni
2023-11-24 15:00   ` patchwork-bot+netdevbpf
     [not found] <tencent_1A577926DC937A2360297AE3B6C454D76605@qq.com>
2023-11-23  0:51 ` [syzbot] [mptcp?] KMSAN: " syzbot

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=193463799264cd58373df81b6e93cc4091c83ca5.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=kuniyu@amazon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martineau@kernel.org \
    --cc=matthieu.baerts@tessares.net \
    --cc=matttbe@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+b834a6b2decad004cfa1@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®