Subject: Re: [syzbot] KASAN: use-after-free Read in nf_confirm

From: Florian Westphal <[email-masked]>
Date: Tue, 17 May 2022 21:47:51 +0200

syzbot <[email-masked]> wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    d887ae3247e0 octeontx2-pf: Remove unnecessary synchronize_..
> git tree:       net-next
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=17f2b659f00000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=b1aab282dc5dd920
> dashboard link: https://syzkaller.appspot.com/bug?extid=793a590957d9c1b96620
> compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1313dce6f00000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=169eb59ef00000
> 
> The issue was bisected to:
> 
> commit 1397af5bfd7d32b0cf2adb70a78c9a9e8f11d912
> Author: Florian Westphal <[email-masked]>
> Date:   Mon Apr 11 11:01:18 2022 +0000
> 
>     netfilter: conntrack: remove the percpu dying list

AFAICS this bug exists since
Fixes: 71d8c47fc653 ("netfilter: conntrack: introduce clash resolution on insertion race")

nf_confirm needs to re-fetch 'ct' from skb->_nfct.  Will send a patch.