[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200331121438.GA30061@willie-the-truck>
Date: Tue, 31 Mar 2020 13:14:39 +0100
From: Will Deacon <will@...nel.org>
To: Jason Wang <jasowang@...hat.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
bpf@...r.kernel.org, kernel-team@...roid.com,
"David S. Miller" <davem@...emloft.net>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Eric Dumazet <edumazet@...gle.com>
Subject: Re: [RFC PATCH] tun: Don't put_page() for all negative return values
from XDP program
On Tue, Mar 31, 2020 at 10:59:01AM +0800, Jason Wang wrote:
> On 2020/3/31 上午12:12, Will Deacon wrote:
> > When an XDP program is installed, tun_build_skb() grabs a reference to
> > the current page fragment page if the program returns XDP_REDIRECT or
> > XDP_TX. However, since tun_xdp_act() passes through negative return
> > values from the XDP program, it is possible to trigger the error path by
> > mistake and accidentally drop a reference to the fragments page without
> > taking one, leading to a spurious free. This is believed to be the cause
> > of some KASAN use-after-free reports from syzbot [1], although without a
> > reproducer it is not possible to confirm whether this patch fixes the
> > problem.
> >
> > Ensure that we only drop a reference to the fragments page if the XDP
> > transmit or redirect operations actually fail.
> >
> > [1] https://syzkaller.appspot.com/bug?id=e76a6af1be4acd727ff6bbca669833f98cbf5d95
>
>
> I think the patch fixes the issue reported. Since I can see the warn of bad
> page state in put_page().
[...]
> Acked-by: Jason Wang <jasowang@...hat.com>
Thanks, Jason. In which case, I'll add this tag along with:
Fixes: 8ae1aff0b331 ("tuntap: split out XDP logic")
Will
Powered by blists - more mailing lists