Eric Dumazet
2930ee1a16
ipv6: fix lockdep splat in in6_dump_addrs()
...
commit 4e43e64d0f1332fcc503babad4dc31aead7131ca upstream.
As reported by syzbot, we should not use rcu_dereference()
when rcu_read_lock() is not held.
WARNING: suspicious RCU usage
5.19.0-rc2-syzkaller #0 Not tainted
net/ipv6/addrconf.c:5175 suspicious rcu_dereference_check() usage!
other info that might help us debug this:
rcu_scheduler_active = 2, debug_locks = 1
1 lock held by syz-executor326/3617:
#0 : ffffffff8d5848e8 (rtnl_mutex){+.+.}-{3:3}, at: netlink_dump+0xae/0xc20 net/netlink/af_netlink.c:2223
stack backtrace:
CPU: 0 PID: 3617 Comm: syz-executor326 Not tainted 5.19.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
in6_dump_addrs+0x12d1/0x1790 net/ipv6/addrconf.c:5175
inet6_dump_addr+0x9c1/0xb50 net/ipv6/addrconf.c:5300
netlink_dump+0x541/0xc20 net/netlink/af_netlink.c:2275
__netlink_dump_start+0x647/0x900 net/netlink/af_netlink.c:2380
netlink_dump_start include/linux/netlink.h:245 [inline]
rtnetlink_rcv_msg+0x73e/0xc90 net/core/rtnetlink.c:6046
netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2501
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x543/0x7f0 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x917/0xe10 net/netlink/af_netlink.c:1921
sock_sendmsg_nosec net/socket.c:714 [inline]
sock_sendmsg+0xcf/0x120 net/socket.c:734
____sys_sendmsg+0x6eb/0x810 net/socket.c:2492
___sys_sendmsg+0xf3/0x170 net/socket.c:2546
__sys_sendmsg net/socket.c:2575 [inline]
__do_sys_sendmsg net/socket.c:2584 [inline]
__se_sys_sendmsg net/socket.c:2582 [inline]
__x64_sys_sendmsg+0x132/0x220 net/socket.c:2582
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x46/0xb0
Fixes: 88e2ca308094 ("mld: convert ifmcaddr6 to RCU")
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Taehee Yoo <ap420073@gmail.com>
Link: https://lore.kernel.org/r/20220628121248.858695-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-07 17:53:29 +02:00
..
2020-06-20 21:33:57 -07:00
2021-10-14 23:08:35 +02:00
2021-03-30 13:29:39 -07:00
2022-07-07 17:53:29 +02:00
2020-11-25 11:20:16 -08:00
2021-12-01 09:04:49 +01:00
2021-06-11 14:48:50 +02:00
2020-07-30 16:30:55 -07:00
2021-03-04 15:26:57 -08:00
2020-11-23 18:36:21 -05:00
2022-03-16 14:23:36 +01:00
2022-04-27 14:38:52 +02:00
2021-08-04 10:34:40 +01:00
2021-12-08 09:04:43 +01:00
2020-06-20 21:33:57 -07:00
2022-01-27 11:05:05 +01:00
2020-11-23 18:36:21 -05:00
2022-05-18 10:26:53 +02:00
2021-10-12 11:49:49 +01:00
2021-10-12 11:49:49 +01:00
2022-02-01 17:27:09 +01:00
2022-02-23 12:03:10 +01:00
2022-06-29 09:03:24 +02:00
2021-02-23 11:29:52 -08:00
2022-04-13 20:59:03 +02:00
2022-03-02 11:47:56 +01:00
2022-04-20 09:34:19 +02:00
2022-02-01 17:27:07 +01:00
2020-06-01 14:57:14 -07:00
2022-01-11 15:35:17 +01:00
2022-04-13 20:59:03 +02:00
2021-06-11 14:48:50 +02:00
2021-08-05 11:46:42 +01:00
2021-07-21 08:14:33 -07:00
2021-07-21 08:14:33 -07:00
2021-04-27 14:02:06 -07:00
2022-05-12 12:30:18 +02:00
2021-06-11 14:48:50 +02:00
2021-08-27 17:29:18 -07:00
2022-05-09 09:14:41 +02:00
2021-05-31 22:12:08 -07:00
2020-11-23 18:36:21 -05:00
2020-11-09 15:34:44 -08:00
2022-01-11 15:35:18 +01:00
2021-05-21 15:02:25 -07:00
2022-07-07 17:53:23 +02:00
2020-12-08 16:22:54 -08:00
2020-10-30 12:12:52 -07:00
2022-07-07 17:53:26 +02:00
2021-12-14 10:57:09 +01:00
2022-01-27 11:05:05 +01:00
2022-01-27 11:05:05 +01:00
2022-07-07 17:53:29 +02:00
2022-05-09 09:14:37 +02:00
2021-07-21 08:14:33 -07:00
2022-06-14 18:36:11 +02:00
2020-07-09 12:52:37 +02:00
2020-07-24 15:41:54 -07:00
2021-03-30 17:06:49 -07:00
2022-01-27 11:05:05 +01:00
2020-07-19 18:16:41 -07:00
2022-04-08 14:22:46 +02:00
2021-06-09 09:38:52 +02:00