From: Daniel Borkmann <daniel@iogearbox.net>
To: "Björn Töpel" <bjorn.topel@intel.com>
Cc: Jonathan Lemon <jonathan.lemon@gmail.com>,
netdev@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
kernel-team@fb.com, bpf <bpf@vger.kernel.org>,
"Karlsson, Magnus" <magnus.karlsson@intel.com>,
syzkaller-bugs@googlegroups.com,
syzbot+491c1b7565ba9069ecae@syzkaller.appspotmail.com
Subject: Re: [PATCH net] bpf/xskmap: Return ERR_PTR for failure case instead of NULL.
Date: Wed, 25 Sep 2019 22:19:59 +0200 [thread overview]
Message-ID: <20190925201959.GB9500@pc-63.home> (raw)
In-Reply-To: <5f85df65-0f2e-3533-9734-147b0734e254@intel.com>
On Tue, Sep 24, 2019 at 09:30:44PM +0200, Björn Töpel wrote:
> On 2019-09-24 18:25, Jonathan Lemon wrote:
> > When kzalloc() failed, NULL was returned to the caller, which
> > tested the pointer with IS_ERR(), which didn't match, so the
> > pointer was used later, resulting in a NULL dereference.
> >
> > Return ERR_PTR(-ENOMEM) instead of NULL.
> >
> > Reported-by: syzbot+491c1b7565ba9069ecae@syzkaller.appspotmail.com
> > Fixes: 0402acd683c6 ("xsk: remove AF_XDP socket from map when the socket is released")
> > Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
>
> Thanks Jonathan! You beat me to it! :-P
>
> Acked-by: Björn Töpel <bjorn.topel@intel.com>
Applied, thanks!
prev parent reply other threads:[~2019-09-25 20:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190924162521.1630419-1-jonathan.lemon@gmail.com>
2019-09-24 19:30 ` [PATCH net] bpf/xskmap: Return ERR_PTR for failure case instead of NULL Björn Töpel
2019-09-25 20:19 ` Daniel Borkmann [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=20190925201959.GB9500@pc-63.home \
--to=daniel@iogearbox.net \
--cc=ast@kernel.org \
--cc=bjorn.topel@intel.com \
--cc=bpf@vger.kernel.org \
--cc=jonathan.lemon@gmail.com \
--cc=kernel-team@fb.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=syzbot+491c1b7565ba9069ecae@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