[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190925201959.GB9500@pc-63.home>
Date: Wed, 25 Sep 2019 22:19:59 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Björn Töpel <bjorn.topel@...el.com>
Cc: Jonathan Lemon <jonathan.lemon@...il.com>, netdev@...r.kernel.org,
Alexei Starovoitov <ast@...nel.org>, kernel-team@...com,
bpf <bpf@...r.kernel.org>,
"Karlsson, Magnus" <magnus.karlsson@...el.com>,
syzkaller-bugs@...glegroups.com,
syzbot+491c1b7565ba9069ecae@...kaller.appspotmail.com
Subject: Re: [PATCH net] bpf/xskmap: Return ERR_PTR for failure case instead
of NULL.
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@...kaller.appspotmail.com
> > Fixes: 0402acd683c6 ("xsk: remove AF_XDP socket from map when the socket is released")
> > Signed-off-by: Jonathan Lemon <jonathan.lemon@...il.com>
>
> Thanks Jonathan! You beat me to it! :-P
>
> Acked-by: Björn Töpel <bjorn.topel@...el.com>
Applied, thanks!
Powered by blists - more mailing lists