From: Florian Westphal <fw@strlen•de>
To: Eric Dumazet <edumazet@google•com>
Cc: syzbot <syzbot+0c4150bff9fff3bf023c@syzkaller•appspotmail.com>,
andrii@kernel•org, ast@kernel•org, bpf@vger•kernel.org,
daniel@iogearbox•net, davem@davemloft•net, eddyz87@gmail•com,
fw@strlen•de, haoluo@google•com, horms@kernel•org,
john.fastabend@gmail•com, jolsa@kernel•org, kpsingh@kernel•org,
kuba@kernel•org, linux-kernel@vger•kernel.org,
martin.lau@linux•dev, netdev@vger•kernel.org, pabeni@redhat•com,
sdf@google•com, song@kernel•org, syzkaller-bugs@googlegroups•com,
yonghong.song@linux•dev
Subject: Re: [syzbot] [bpf?] [net?] WARNING in skb_ensure_writable
Date: Mon, 22 Apr 2024 16:52:55 +0200 [thread overview]
Message-ID: <20240422145255.GA13918@breakpoint.cc> (raw)
In-Reply-To: <CANn89iKr4pY3wcMb=ONr8f5DU1X300XG8RoX7HU4_FEWSAJ9_w@mail.gmail.com>
Eric Dumazet <edumazet@google•com> wrote:
> Hmm... Not sure how to deal with this one... this is a 'false positive'
>
> diff --git a/net/core/filter.c b/net/core/filter.c
> index 58e8e1a70aa752a2c045117e00d8797478da4738..a7cea6d717ef321215bc4cf9ab3b83535c4eec98
> 100644
> --- a/net/core/filter.c
> +++ b/net/core/filter.c
> @@ -1662,6 +1662,11 @@ static DEFINE_PER_CPU(struct bpf_scratchpad, bpf_sp);
> static inline int __bpf_try_make_writable(struct sk_buff *skb,
> unsigned int write_len)
> {
> +#if defined(CONFIG_DEBUG_NET)
> + /* Avoid a splat in pskb_may_pull_reason() */
> + if (write_len > INT_MAX)
> + return -EINVAL;
> +#endif
> return skb_ensure_writable(skb, write_len);
> }
>
LGTM, thanks Eric. I think the current 'warn on > INT_MAX' makes sense
for normal (non-bpf) callers.
prev parent reply other threads:[~2024-04-22 14:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-22 14:21 [syzbot] [bpf?] [net?] WARNING in skb_ensure_writable syzbot
2024-04-22 14:25 ` Eric Dumazet
2024-04-22 14:52 ` Florian Westphal [this message]
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=20240422145255.GA13918@breakpoint.cc \
--to=fw@strlen$(echo .)de \
--cc=andrii@kernel$(echo .)org \
--cc=ast@kernel$(echo .)org \
--cc=bpf@vger$(echo .)kernel.org \
--cc=daniel@iogearbox$(echo .)net \
--cc=davem@davemloft$(echo .)net \
--cc=eddyz87@gmail$(echo .)com \
--cc=edumazet@google$(echo .)com \
--cc=haoluo@google$(echo .)com \
--cc=horms@kernel$(echo .)org \
--cc=john.fastabend@gmail$(echo .)com \
--cc=jolsa@kernel$(echo .)org \
--cc=kpsingh@kernel$(echo .)org \
--cc=kuba@kernel$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=martin.lau@linux$(echo .)dev \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=sdf@google$(echo .)com \
--cc=song@kernel$(echo .)org \
--cc=syzbot+0c4150bff9fff3bf023c@syzkaller$(echo .)appspotmail.com \
--cc=syzkaller-bugs@googlegroups$(echo .)com \
--cc=yonghong.song@linux$(echo .)dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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