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
..
2021-07-22 16:19:03 +02:00
2022-03-11 12:22:36 +01:00
2021-08-13 16:30:35 -07:00
2021-12-01 09:04:53 +01:00
2021-07-23 14:20:25 +01:00
2021-06-10 14:08:09 -07:00
2022-06-22 14:22:01 +02:00
2022-05-18 10:26:47 +02:00
2022-06-09 10:22:58 +02:00
2022-04-13 20:59:25 +02:00
2021-06-25 13:13:50 +02:00
2022-05-25 09:57:34 +02:00
2021-09-14 12:51:15 +01:00
2022-05-12 12:30:09 +02:00
2022-05-25 09:57:28 +02:00
2022-06-29 09:03:25 +02:00
2022-03-08 19:12:52 +01:00
2021-11-18 19:16:33 +01:00
2021-08-05 13:27:50 +01:00
2022-05-09 09:14:34 +02:00
2021-08-03 13:05:26 +01:00
2022-06-29 09:03:23 +02:00
2022-06-29 09:03:22 +02:00
2022-02-08 18:34:09 +01:00
2022-07-07 17:53:29 +02:00
2022-07-07 17:53:29 +02:00
2021-08-09 10:13:32 +01:00
2021-06-29 11:28:21 -07:00
2022-06-14 18:36:22 +02:00
2022-06-22 14:21:58 +02:00
2022-04-27 14:38:53 +02:00
2021-06-08 16:31:25 -07:00
2022-03-28 09:58:46 +02:00
2022-06-09 10:23:26 +02:00
2021-09-07 14:06:08 +01:00
2022-04-13 20:59:16 +02:00
2021-12-08 09:04:47 +01:00
2022-06-09 10:22:46 +02:00
2022-01-05 12:42:37 +01:00
2022-07-07 17:53:27 +02:00
2022-04-13 20:59:10 +02:00
2022-05-18 10:26:49 +02:00
2022-01-27 11:04:00 +01:00
2022-06-09 10:22:46 +02:00
2022-06-29 09:03:18 +02:00
2022-04-27 14:38:53 +02:00
2022-01-11 15:35:16 +01:00
2021-09-02 11:37:02 +01:00
2021-12-22 09:32:42 +01:00
2022-04-08 14:23:00 +02:00
2022-07-07 17:53:25 +02:00
2022-06-09 10:23:02 +02:00
2022-07-07 17:53:27 +02:00
2022-06-09 10:22:59 +02:00
2022-06-14 18:36:11 +02:00
2021-11-18 19:17:11 +01:00
2022-07-07 17:53:25 +02:00
2021-08-04 12:35:07 +01:00
2022-07-07 17:53:28 +02:00
2022-06-29 09:03:25 +02:00
2022-06-14 18:36:17 +02:00
2022-04-08 14:23:51 +02:00
2022-06-09 10:23:26 +02:00
2022-04-08 14:23:53 +02:00
2022-06-29 09:03:21 +02:00
2022-05-25 09:57:30 +02:00
2021-06-03 15:13:56 -07:00
2021-06-11 12:55:28 -07:00
2021-07-29 15:06:49 +01:00
2021-07-29 15:06:49 +01:00
2022-01-27 11:03:52 +01:00