[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87y160407o.fsf@toke.dk>
Date: Wed, 17 Jul 2024 15:28:11 +0200
From: Toke Høiland-Jørgensen <toke@...hat.com>
To: Martin KaFai Lau <martin.lau@...ux.dev>, Michal Switala
<michal.switala@...ogain.com>
Cc: bpf@...r.kernel.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, revest@...gle.com,
syzbot+cca39e6e84a367a7e6f6@...kaller.appspotmail.com,
alexei.starovoitov@...il.com
Subject: Re: [PATCH] bpf: Ensure BPF programs testing skb context
initialization
Martin KaFai Lau <martin.lau@...ux.dev> writes:
> On 7/15/24 11:13 AM, Michal Switala wrote:
>
> >> Reported-by: syzbot+cca39e6e84a367a7e6f6@...kaller.appspotmail.com
> >> Closes: https://syzkaller.appspot.com/bug?extid=cca39e6e84a367a7e6f6
> >> Link: https://lore.kernel.org/all/000000000000b95d41061cbf302a@google.com/
> >
> > Something doesn't add up.
> > This syzbot report is about:
> >
> > dev_map_enqueue+0x31/0x3e0 kernel/bpf/devmap.c:539
> > __xdp_do_redirect_frame net/core/filter.c:4397 [inline]
> > bpf_prog_test_run_xdp
> >
> > why you're fixing bpf_prog_test_run_skb ?
>
>
> [ Please keep the relevant email context in the reply ]
>
>
>> The reproducer calls the methods bpf_prog_test_run_xdp and
>> bpf_prog_test_run_skb. Both lead to the invocation of dev_map_enqueue, in the
>
> The syzbot report is triggering from the bpf_prog_test_run_xdp. I agree with
> Alexei that fixing the bpf_prog_test_run_skb does not make sense. At least I
> don't see how dev_map_enqueue can be used from bpf_prog_test_run_skb.
Me neither.
> It looks very similar to
> https://lore.kernel.org/bpf/000000000000f6531b061494e696@google.com/. It has
> been fixed in commit 5bcf0dcbf906 ("xdp: use flags field to disambiguate
> broadcast redirect")
>
> I tried the C repro. I can reproduce in the bpf tree also which should have the
> fix. I cannot reproduce in the bpf-next though.
>
> Cc Toke who knows more details here.
Hmm, yeah, it does look kinda similar. Do you mean that the C repro from
this new report triggers the crash for you on the current -bpf tree?
-Toke
Powered by blists - more mailing lists