[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210809214027.GQ607@breakpoint.cc>
Date: Mon, 9 Aug 2021 23:40:27 +0200
From: Florian Westphal <fw@...len.de>
To: Pavel Skripkin <paskripkin@...il.com>
Cc: Florian Westphal <fw@...len.de>,
syzbot <syzbot+649e339fa6658ee623d3@...kaller.appspotmail.com>,
coreteam@...filter.org, davem@...emloft.net, kadlec@...filter.org,
kuba@...nel.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, netfilter-devel@...r.kernel.org,
pablo@...filter.org, syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] KASAN: use-after-free Write in nft_ct_tmpl_put_pcpu
Pavel Skripkin <paskripkin@...il.com> wrote:
> Dumb question: why per_cpu() will return 2 different pointers for CPU 1 and
> CPU 0? As I understand for_each_possible_cpu() will iterate over all
> CPUs which could ever be enabled. So, we can hit situation when 2 concurrent
> processes call per_cpu() with same cpu value (*).
Yes, that is what I was trying to say, the race is that we can have > 1
processes here ever since the global transaction mutex was removed in 2018.
> Anyway, I think, moving locking a bit higher is good here, let's test it. I
> will prepare a patch, if it will pass syzbot testing, thanks!
It looks correct to me, thanks.
Powered by blists - more mailing lists