netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <dsahern@kernel.org>
Cc: <davem@davemloft.net>, <edumazet@google.com>, <elver@google.com>,
	<horms@kernel.org>, <justinstitt@google.com>, <kees@kernel.org>,
	<kuba@kernel.org>, <linux-kernel@vger.kernel.org>,
	<netdev@vger.kernel.org>, <pabeni@redhat.com>,
	<syzbot+8f8024317adff163ec5a@syzkaller.appspotmail.com>,
	<syzkaller-bugs@googlegroups.com>, <kuniyu@amazon.com>
Subject: Re: [syzbot] [net?] UBSAN: array-index-out-of-bounds in ip6_rt_copy_init
Date: Thu, 1 May 2025 18:15:28 -0700	[thread overview]
Message-ID: <20250502011550.66510-1-kuniyu@amazon.com> (raw)
In-Reply-To: <e1e1fa75-e9c2-4ae7-befb-f3910a349a9f@kernel.org>

From: David Ahern <dsahern@kernel.org>
Date: Thu, 1 May 2025 14:44:03 -0600
> On 5/1/25 2:12 PM, Kees Cook wrote:
> > static int ip6_rt_type_to_error(u8 fib6_type)
> > {
> >         return fib6_prop[fib6_type];
> > }
> > 
> > Perhaps some kind of type confusion, as this is being generated through
> > ip6_rt_init_dst_reject(). Is the fib6_type not "valid" on a reject?
> 
> fib6_result is initialized to 0 in ip6_pol_route and no setting of
> fib6_type should be > RTN_MAX.
> 
> > 
> > The reproducer appears to be just absolutely spamming netlink with
> > requests -- it's not at all obvious to me where the fib6_type is even
> > coming from. I think this is already only reachable on the error path
> > (i.e. it's during a "reject", it looks like), so the rt->dst.error is
> > just being set weird.
> > 
> > This feels like it's papering over the actual problem:
> 
> yes, if fib6_type is > than RTN_MAX we need to understand where that is
> happening.

Sorry, I think this was my mistake,
https://lore.kernel.org/netdev/20250502002616.60759-1-kuniyu@amazon.com/T/#t

and this will fix it.
https://lore.kernel.org/netdev/20250501005335.53683-1-kuniyu@amazon.com/

Thanks!


#syz dup: [syzbot] [net?] WARNING in ipv6_addr_prefix

  reply	other threads:[~2025-05-02  1:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-01 11:14 [syzbot] [net?] UBSAN: array-index-out-of-bounds in ip6_rt_copy_init syzbot
2025-05-01 20:12 ` Kees Cook
2025-05-01 20:44   ` David Ahern
2025-05-02  1:15     ` Kuniyuki Iwashima [this message]
2025-05-02  2:43       ` Kees Cook

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=20250502011550.66510-1-kuniyu@amazon.com \
    --to=kuniyu@amazon.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=elver@google.com \
    --cc=horms@kernel.org \
    --cc=justinstitt@google.com \
    --cc=kees@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=syzbot+8f8024317adff163ec5a@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;
as well as URLs for NNTP newsgroup(s).