[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <93a31a81-a586-3fbb-d98b-ce78a4927ff7@kernel.org>
Date: Wed, 13 Apr 2022 18:39:52 -0600
From: David Ahern <dsahern@...nel.org>
To: Eric Dumazet <eric.dumazet@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: netdev <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
syzbot <syzkaller@...glegroups.com>
Subject: Re: [PATCH net] ipv6: make ip6_rt_gc_expire an atomic_t
On 4/13/22 12:13 PM, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@...gle.com>
>
> Reads and Writes to ip6_rt_gc_expire always have been racy,
> as syzbot reported lately [1]
>
> There is a possible risk of under-flow, leading
> to unexpected high value passed to fib6_run_gc(),
> although I have not observed this in the field.
>
> Hosts hitting ip6_dst_gc() very hard are under pretty bad
> state anyway.
>
> [1]
> BUG: KCSAN: data-race in ip6_dst_gc / ip6_dst_gc
>
> read-write to 0xffff888102110744 of 4 bytes by task 13165 on cpu 1:
> ip6_dst_gc+0x1f3/0x220 net/ipv6/route.c:3311
> dst_alloc+0x9b/0x160 net/core/dst.c:86
> ip6_dst_alloc net/ipv6/route.c:344 [inline]
> icmp6_dst_alloc+0xb2/0x360 net/ipv6/route.c:3261
> mld_sendpack+0x2b9/0x580 net/ipv6/mcast.c:1807
> mld_send_cr net/ipv6/mcast.c:2119 [inline]
> mld_ifc_work+0x576/0x800 net/ipv6/mcast.c:2651
> process_one_work+0x3d3/0x720 kernel/workqueue.c:2289
> worker_thread+0x618/0xa70 kernel/workqueue.c:2436
> kthread+0x1a9/0x1e0 kernel/kthread.c:376
> ret_from_fork+0x1f/0x30
>
> read-write to 0xffff888102110744 of 4 bytes by task 11607 on cpu 0:
> ip6_dst_gc+0x1f3/0x220 net/ipv6/route.c:3311
> dst_alloc+0x9b/0x160 net/core/dst.c:86
> ip6_dst_alloc net/ipv6/route.c:344 [inline]
> icmp6_dst_alloc+0xb2/0x360 net/ipv6/route.c:3261
> mld_sendpack+0x2b9/0x580 net/ipv6/mcast.c:1807
> mld_send_cr net/ipv6/mcast.c:2119 [inline]
> mld_ifc_work+0x576/0x800 net/ipv6/mcast.c:2651
> process_one_work+0x3d3/0x720 kernel/workqueue.c:2289
> worker_thread+0x618/0xa70 kernel/workqueue.c:2436
> kthread+0x1a9/0x1e0 kernel/kthread.c:376
> ret_from_fork+0x1f/0x30
>
> value changed: 0x00000bb3 -> 0x00000ba9
>
> Reported by Kernel Concurrency Sanitizer on:
> CPU: 0 PID: 11607 Comm: kworker/0:21 Not tainted 5.18.0-rc1-syzkaller-00037-g42e7a03d3bad-dirty #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> Workqueue: mld mld_ifc_work
>
> Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Reported-by: syzbot <syzkaller@...glegroups.com>
> ---
> include/net/netns/ipv6.h | 4 ++--
> net/ipv6/route.c | 11 ++++++-----
> 2 files changed, 8 insertions(+), 7 deletions(-)
>
Reviewed-by: David Ahern <dsahern@...nel.org>
Powered by blists - more mailing lists