From: Yonghong Song <yonghong.song@linux.dev>
To: Edward Adam Davis <eadavis@qq.com>,
syzbot+e2c932aec5c8a6e1d31c@syzkaller.appspotmail.com
Cc: andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org,
daniel@iogearbox.net, davem@davemloft.net, edumazet@google.com,
haoluo@google.com, hawk@kernel.org, john.fastabend@gmail.com,
jolsa@kernel.org, kpsingh@kernel.org, kuba@kernel.org,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
martin.lau@kernel.org, martin.lau@linux.dev, mhiramat@kernel.org,
netdev@vger.kernel.org, pabeni@redhat.com, rostedt@goodmis.org,
sdf@google.com, song@kernel.org, syzkaller-bugs@googlegroups.com,
yhs@fb.com
Subject: Re: [PATCH net] bpf: test_run: fix WARNING in format_decode
Date: Tue, 21 Nov 2023 21:28:29 -0800 [thread overview]
Message-ID: <4f832b6f-97b1-45b1-a210-b497ee6e55d5@linux.dev> (raw)
In-Reply-To: <tencent_884D1773977426D9D3600371696883B6A405@qq.com>
On 11/21/23 7:50 PM, Edward Adam Davis wrote:
> Confirm that skb->len is not 0 to ensure that skb length is valid.
>
> Fixes: 114039b34201 ("bpf: Move skb->len == 0 checks into __bpf_redirect")
> Reported-by: syzbot+e2c932aec5c8a6e1d31c@syzkaller.appspotmail.com
> Signed-off-by: Edward Adam Davis <eadavis@qq.com>
Stan, Could you take a look at this patch?
> ---
> net/bpf/test_run.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c
> index c9fdcc5cdce1..78258a822a5c 100644
> --- a/net/bpf/test_run.c
> +++ b/net/bpf/test_run.c
> @@ -845,6 +845,9 @@ static int convert___skb_to_skb(struct sk_buff *skb, struct __sk_buff *__skb)
> {
> struct qdisc_skb_cb *cb = (struct qdisc_skb_cb *)skb->cb;
>
> + if (!skb->len)
> + return -EINVAL;
> +
> if (!__skb)
> return 0;
>
next prev parent reply other threads:[~2023-11-22 5:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-21 22:43 [syzbot] [bpf?] [trace?] WARNING in format_decode (3) syzbot
2023-11-22 0:50 ` [PATCH net] bpf: test_run: fix WARNING in format_decode Edward Adam Davis
2023-11-22 5:28 ` Yonghong Song [this message]
2023-11-27 14:10 ` Daniel Borkmann
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=4f832b6f-97b1-45b1-a210-b497ee6e55d5@linux.dev \
--to=yonghong.song@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=eadavis@qq.com \
--cc=edumazet@google.com \
--cc=haoluo@google.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=martin.lau@kernel.org \
--cc=martin.lau@linux.dev \
--cc=mhiramat@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rostedt@goodmis.org \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=syzbot+e2c932aec5c8a6e1d31c@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=yhs@fb.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).