WARNING: suspicious RCU usage in tcp_disconnect

7 views
Skip to first unread message

syzbot

unread,
May 7, 2019, 4:03:06 AM5/7/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 6d1510d8 Linux 4.14.116
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13783ed0a00000
kernel config: https://syzkaller.appspot.com/x/.config?x=a6d219c3406cc65d
dashboard link: https://syzkaller.appspot.com/bug?extid=999f4a948e5c8343cea3
compiler: gcc (GCC) 9.0.0 20181231 (experimental)

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+999f4a...@syzkaller.appspotmail.com

team0 (unregistering): Port device team_slave_0 removed
bond0 (unregistering): Releasing backup interface bond_slave_1
bond0 (unregistering): Releasing backup interface bond_slave_0
bond0 (unregistering): Released all slaves
=============================
WARNING: suspicious RCU usage
4.14.116 #6 Not tainted
-----------------------------
./include/net/sock.h:1792 suspicious rcu_dereference_protected() usage!

other info that might help us debug this:


rcu_scheduler_active = 2, debug_locks = 1
4 locks held by kworker/u4:1/22:
#0: ("%s""netns"){+.+.}, at: [<ffffffff813d2dbe>] work_static
include/linux/workqueue.h:199 [inline]
#0: ("%s""netns"){+.+.}, at: [<ffffffff813d2dbe>] set_work_data
kernel/workqueue.c:619 [inline]
#0: ("%s""netns"){+.+.}, at: [<ffffffff813d2dbe>]
set_work_pool_and_clear_pending kernel/workqueue.c:646 [inline]
#0: ("%s""netns"){+.+.}, at: [<ffffffff813d2dbe>]
process_one_work+0x76e/0x1610 kernel/workqueue.c:2085
#1: (net_cleanup_work){+.+.}, at: [<ffffffff813d2dfb>]
process_one_work+0x7ab/0x1610 kernel/workqueue.c:2089
#2: (net_mutex){+.+.}, at: [<ffffffff84d3108c>] cleanup_net+0x11c/0x880
net/core/net_namespace.c:450
#3: (rtnl_mutex){+.+.}, at: [<ffffffff84d902c7>] rtnl_lock+0x17/0x20
net/core/rtnetlink.c:72

stack backtrace:
CPU: 1 PID: 22 Comm: kworker/u4:1 Not tainted 4.14.116 #6
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Workqueue: netns cleanup_net
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x138/0x19c lib/dump_stack.c:53
lockdep_rcu_suspicious+0x153/0x15d kernel/locking/lockdep.c:4662
__sk_dst_set include/net/sock.h:1792 [inline]
__sk_dst_reset include/net/sock.h:1812 [inline]
tcp_disconnect+0x1142/0x1540 net/ipv4/tcp.c:2365
rds_tcp_conn_paths_destroy net/rds/tcp.c:515 [inline]
rds_tcp_kill_sock net/rds/tcp.c:544 [inline]
rds_tcp_dev_event+0x75e/0xa70 net/rds/tcp.c:573
notifier_call_chain+0x116/0x1b0 kernel/notifier.c:93
__raw_notifier_call_chain kernel/notifier.c:394 [inline]
raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:401
call_netdevice_notifiers_info+0x56/0x70 net/core/dev.c:1671
call_netdevice_notifiers net/core/dev.c:1687 [inline]
netdev_run_todo+0x215/0x770 net/core/dev.c:7904
rtnl_unlock+0xe/0x10 net/core/rtnetlink.c:106
default_device_exit_batch+0x32a/0x3d0 net/core/dev.c:8722
ops_exit_list.isra.0+0x105/0x160 net/core/net_namespace.c:145
cleanup_net+0x3ba/0x880 net/core/net_namespace.c:484
process_one_work+0x868/0x1610 kernel/workqueue.c:2114
worker_thread+0x5d9/0x1050 kernel/workqueue.c:2248
kthread+0x31c/0x430 kernel/kthread.c:232
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:402
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_1
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_1
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_1
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_1
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_1
kauditd_printk_skb: 6 callbacks suppressed
audit: type=1326 audit(1557212564.935:340): auid=4294967295 uid=0 gid=0
ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=24393
comm="syz-executor.1" exe="/root/syz-executor.1" sig=9 arch=c000003e
syscall=228 compat=0 ip=0x45bc0a code=0x0
TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending
cookies. Check SNMP counters.
TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending
cookies. Check SNMP counters.
audit: type=1326 audit(1557212565.815:341): auid=4294967295 uid=0 gid=0
ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=24424
comm="syz-executor.1" exe="/root/syz-executor.1" sig=9 arch=c000003e
syscall=228 compat=0 ip=0x45bc0a code=0x0
audit: type=1326 audit(1557212565.865:342): auid=4294967295 uid=0 gid=0
ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=24428
comm="syz-executor.5" exe="/root/syz-executor.5" sig=9 arch=c000003e
syscall=228 compat=0 ip=0x45bc0a code=0x0
TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending
cookies. Check SNMP counters.
audit: type=1326 audit(1557212566.645:343): auid=4294967295 uid=0 gid=0
ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=24459
comm="syz-executor.1" exe="/root/syz-executor.1" sig=9 arch=c000003e
syscall=228 compat=0 ip=0x45bc0a code=0x0
TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending
cookies. Check SNMP counters.
audit: type=1326 audit(1557212566.835:344): auid=4294967295 uid=0 gid=0
ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=24466
comm="syz-executor.5" exe="/root/syz-executor.5" sig=9 arch=c000003e
syscall=228 compat=0 ip=0x45bc0a code=0x0
TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending
cookies. Check SNMP counters.
TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending
cookies. Check SNMP counters.
audit: type=1326 audit(1557212567.585:345): auid=4294967295 uid=0 gid=0
ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=24484
comm="syz-executor.1" exe="/root/syz-executor.1" sig=9 arch=c000003e
syscall=228 compat=0 ip=0x45bc0a code=0x0
TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending
cookies. Check SNMP counters.
audit: type=1326 audit(1557212567.815:346): auid=4294967295 uid=0 gid=0
ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=24491
comm="syz-executor.5" exe="/root/syz-executor.5" sig=9 arch=c000003e
syscall=228 compat=0 ip=0x45bc0a code=0x0
TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending
cookies. Check SNMP counters.
TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending
cookies. Check SNMP counters.
TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending
cookies. Check SNMP counters.
TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending
cookies. Check SNMP counters.
TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending
cookies. Check SNMP counters.
TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending
cookies. Check SNMP counters.


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Mar 18, 2020, 5:56:16 PM3/18/20
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: 12cd844a Linux 4.14.173
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1204a61de00000
kernel config: https://syzkaller.appspot.com/x/.config?x=8a9d0602a0f7791e
dashboard link: https://syzkaller.appspot.com/bug?extid=999f4a948e5c8343cea3
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1080561de00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10a34023e00000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+999f4a...@syzkaller.appspotmail.com

team0 (unregistering): Port device team_slave_0 removed
bond0 (unregistering): Releasing backup interface bond_slave_1
bond0 (unregistering): Releasing backup interface bond_slave_0
bond0 (unregistering): Released all slaves
=============================
WARNING: suspicious RCU usage
4.14.173-syzkaller #0 Not tainted
-----------------------------
include/net/sock.h:1797 suspicious rcu_dereference_protected() usage!

other info that might help us debug this:


rcu_scheduler_active = 2, debug_locks = 1
4 locks held by kworker/u4:3/967:
#0: ("%s""netns"){+.+.}, at: [<ffffffff813b5827>] work_static include/linux/workqueue.h:199 [inline]
#0: ("%s""netns"){+.+.}, at: [<ffffffff813b5827>] set_work_data kernel/workqueue.c:619 [inline]
#0: ("%s""netns"){+.+.}, at: [<ffffffff813b5827>] set_work_pool_and_clear_pending kernel/workqueue.c:646 [inline]
#0: ("%s""netns"){+.+.}, at: [<ffffffff813b5827>] process_one_work+0x727/0x1540 kernel/workqueue.c:2085
#1: (net_cleanup_work){+.+.}, at: [<ffffffff813b5861>] process_one_work+0x761/0x1540 kernel/workqueue.c:2089
#2: (net_mutex){+.+.}, at: [<ffffffff84fc6203>] cleanup_net+0x123/0x820 net/core/net_namespace.c:450
#3: (rtnl_mutex){+.+.}, at: [<ffffffff84ffaf76>] netdev_run_todo+0x1e6/0x710 net/core/dev.c:7919

stack backtrace:
CPU: 0 PID: 967 Comm: kworker/u4:3 Not tainted 4.14.173-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: netns cleanup_net
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x13e/0x194 lib/dump_stack.c:58
__sk_dst_set include/net/sock.h:1797 [inline]
__sk_dst_reset include/net/sock.h:1817 [inline]
tcp_disconnect+0x1389/0x1800 net/ipv4/tcp.c:2378
rds_tcp_conn_paths_destroy net/rds/tcp.c:515 [inline]
rds_tcp_kill_sock net/rds/tcp.c:544 [inline]
rds_tcp_dev_event+0x72a/0xa10 net/rds/tcp.c:573
notifier_call_chain+0x107/0x1a0 kernel/notifier.c:93
call_netdevice_notifiers net/core/dev.c:1687 [inline]
netdev_run_todo+0x1f6/0x710 net/core/dev.c:7920
default_device_exit_batch+0x2e7/0x380 net/core/dev.c:8740
ops_exit_list.isra.0+0xef/0x140 net/core/net_namespace.c:145
cleanup_net+0x3bb/0x820 net/core/net_namespace.c:484
process_one_work+0x813/0x1540 kernel/workqueue.c:2114
worker_thread+0x5d1/0x1070 kernel/workqueue.c:2248
kthread+0x30d/0x420 kernel/kthread.c:232
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
NOHZ: local_softirq_pending 08
NOHZ: local_softirq_pending 08
batman_adv: batadv0: Interface deactivated: batadv_slave_0
batman_adv: batadv0: Removing interface: batadv_slave_0
batman_adv: batadv0: Interface deactivated: batadv_slave_1
batman_adv: batadv0: Removing interface: batadv_slave_1
device bridge_slave_1 left promiscuous mode
bridge0: port 2(bridge_slave_1) entered disabled state
device bridge_slave_0 left promiscuous mode
bridge0: port 1(bridge_slave_0) entered disabled state
batman_adv: batadv0: Interface deactivated: batadv_slave_0
batman_adv: batadv0: Removing interface: batadv_slave_0
batman_adv: batadv0: Interface deactivated: batadv_slave_1
batman_adv: batadv0: Removing interface: batadv_slave_1
device bridge_slave_1 left promiscuous mode
bridge0: port 2(bridge_slave_1) entered disabled state
device bridge_slave_0 left promiscuous mode
bridge0: port 1(bridge_slave_0) entered disabled state
batman_adv: batadv0: Interface deactivated: batadv_slave_0
batman_adv: batadv0: Removing interface: batadv_slave_0
batman_adv: batadv0: Interface deactivated: batadv_slave_1
batman_adv: batadv0: Removing interface: batadv_slave_1
device bridge_slave_1 left promiscuous mode
bridge0: port 2(bridge_slave_1) entered disabled state
device bridge_slave_0 left promiscuous mode
bridge0: port 1(bridge_slave_0) entered disabled state
batman_adv: batadv0: Interface deactivated: batadv_slave_0
batman_adv: batadv0: Removing interface: batadv_slave_0
batman_adv: batadv0: Interface deactivated: batadv_slave_1
batman_adv: batadv0: Removing interface: batadv_slave_1
device bridge_slave_1 left promiscuous mode
bridge0: port 2(bridge_slave_1) entered disabled state
device bridge_slave_0 left promiscuous mode
bridge0: port 1(bridge_slave_0) entered disabled state
batman_adv: batadv0: Interface deactivated: batadv_slave_0
batman_adv: batadv0: Removing interface: batadv_slave_0
batman_adv: batadv0: Interface deactivated: batadv_slave_1
batman_adv: batadv0: Removing interface: batadv_slave_1
device bridge_slave_1 left promiscuous mode
bridge0: port 2(bridge_slave_1) entered disabled state
device bridge_slave_0 left promiscuous mode
bridge0: port 1(bridge_slave_0) entered disabled state
device veth1_macvtap left promiscuous mode
device veth0_macvtap left promiscuous mode
device veth1_vlan left promiscuous mode
device veth0_vlan left promiscuous mode
device veth1_macvtap left promiscuous mode
device veth0_macvtap left promiscuous mode
device veth1_vlan left promiscuous mode
device veth0_vlan left promiscuous mode
device veth1_macvtap left promiscuous mode
device veth0_macvtap left promiscuous mode
device veth1_vlan left promiscuous mode
device veth0_vlan left promiscuous mode
device veth1_macvtap left promiscuous mode
device veth0_macvtap left promiscuous mode
device veth1_vlan left promiscuous mode
device veth0_vlan left promiscuous mode
device veth1_macvtap left promiscuous mode
device veth0_macvtap left promiscuous mode
device veth1_vlan left promiscuous mode
device veth0_vlan left promiscuous mode
device hsr_slave_1 left promiscuous mode
device hsr_slave_0 left promiscuous mode
team0 (unregistering): Port device team_slave_1 removed
team0 (unregistering): Port device team_slave_0 removed
bond0 (unregistering): Releasing backup interface bond_slave_1
bond0 (unregistering): Releasing backup interface bond_slave_0
bond0 (unregistering): Released all slaves
device hsr_slave_1 left promiscuous mode
device hsr_slave_0 left promiscuous mode
team0 (unregistering): Port device team_slave_1 removed
team0 (unregistering): Port device team_slave_0 removed
bond0 (unregistering): Releasing backup interface bond_slave_1
bond0 (unregistering): Releasing backup interface bond_slave_0
bond0 (unregistering): Released all slaves
device hsr_slave_1 left promiscuous mode
device hsr_slave_0 left promiscuous mode
team0 (unregistering): Port device team_slave_1 removed
team0 (unregistering): Port device team_slave_0 removed
bond0 (unregistering): Releasing backup interface bond_slave_1
bond0 (unregistering): Releasing backup interface bond_slave_0
bond0 (unregistering): Released all slaves
device hsr_slave_1 left promiscuous mode
device hsr_slave_0 left promiscuous mode
team0 (unregistering): Port device team_slave_1 removed
team0 (unregistering): Port device team_slave_0 removed
bond0 (unregistering): Releasing backup interface bond_slave_1
bond0 (unregistering): Releasing backup interface bond_slave_0
bond0 (unregistering): Released all slaves
device hsr_slave_1 left promiscuous mode
device hsr_slave_0 left promiscuous mode
team0 (unregistering): Port device team_slave_1 removed
Reply all
Reply to author
Forward
0 new messages