possible deadlock in hsr_dev_destroy

14 views
Skip to first unread message

syzbot

unread,
Feb 27, 2020, 12:28:14 AM2/27/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 98db2bf2 Linux 4.14.171
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15a1ed31e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=49cf7d1ab0dd7451
dashboard link: https://syzkaller.appspot.com/bug?extid=9113e147c58e1161a68e
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+9113e1...@syzkaller.appspotmail.com

R13: 00000000000009f9 R14: 00000000004cc6fa R15: 000000000000000b
============================================
WARNING: possible recursive locking detected
4.14.171-syzkaller #0 Not tainted
--------------------------------------------
syz-executor.2/14048 is trying to acquire lock:
(rtnl_mutex){+.+.}, at: [<ffffffff863793bb>] hsr_dev_destroy+0x1b/0xb0 net/hsr/hsr_device.c:373

but task is already holding lock:
(rtnl_mutex){+.+.}, at: [<ffffffff850246dd>] rtnl_lock net/core/rtnetlink.c:72 [inline]
(rtnl_mutex){+.+.}, at: [<ffffffff850246dd>] rtnetlink_rcv_msg+0x31d/0xb10 net/core/rtnetlink.c:4310

other info that might help us debug this:
Possible unsafe locking scenario:

CPU0
----
lock(rtnl_mutex);
lock(rtnl_mutex);

*** DEADLOCK ***

May be due to missing lock nesting notation

1 lock held by syz-executor.2/14048:
#0: (rtnl_mutex){+.+.}, at: [<ffffffff850246dd>] rtnl_lock net/core/rtnetlink.c:72 [inline]
#0: (rtnl_mutex){+.+.}, at: [<ffffffff850246dd>] rtnetlink_rcv_msg+0x31d/0xb10 net/core/rtnetlink.c:4310

stack backtrace:
CPU: 1 PID: 14048 Comm: syz-executor.2 Not tainted 4.14.171-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x13e/0x194 lib/dump_stack.c:58
print_deadlock_bug kernel/locking/lockdep.c:1796 [inline]
check_deadlock kernel/locking/lockdep.c:1843 [inline]
validate_chain kernel/locking/lockdep.c:2444 [inline]
__lock_acquire.cold+0x2bf/0x8dc kernel/locking/lockdep.c:3487
lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3994
__mutex_lock_common kernel/locking/mutex.c:756 [inline]
__mutex_lock+0xe8/0x1470 kernel/locking/mutex.c:893
hsr_dev_destroy+0x1b/0xb0 net/hsr/hsr_device.c:373
register_netdevice+0x793/0xc70 net/core/dev.c:7714
hsr_dev_finalize+0x57b/0x7fe net/hsr/hsr_device.c:492
hsr_newlink+0x248/0x330 net/hsr/hsr_netlink.c:72
rtnl_newlink+0xecb/0x1720 net/core/rtnetlink.c:2728
rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4315
netlink_rcv_skb+0x127/0x370 net/netlink/af_netlink.c:2432
netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline]
netlink_unicast+0x437/0x620 net/netlink/af_netlink.c:1312
netlink_sendmsg+0x733/0xbe0 net/netlink/af_netlink.c:1877
sock_sendmsg_nosec net/socket.c:646 [inline]
sock_sendmsg+0xc5/0x100 net/socket.c:656
___sys_sendmsg+0x70a/0x840 net/socket.c:2062
__sys_sendmsg+0xa3/0x120 net/socket.c:2096
SYSC_sendmsg net/socket.c:2107 [inline]
SyS_sendmsg+0x27/0x40 net/socket.c:2103
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45c449
RSP: 002b:00007f95f7981c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f95f79826d4 RCX: 000000000045c449
RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000003
RBP: 000000000076bfc0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000006
R13: 00000000000009f9 R14: 00000000004cc6fa R15: 000000000000000b
NOHZ: local_softirq_pending 08


---
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,
Feb 27, 2020, 12:56:13 AM2/27/20
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: 98db2bf2 Linux 4.14.171
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14843645e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=49cf7d1ab0dd7451
dashboard link: https://syzkaller.appspot.com/bug?extid=9113e147c58e1161a68e
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=120958f9e00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=166c7a81e00000

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

RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000003
RBP: 0000000000000004 R08: 0000000000000002 R09: 0000000000003231
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffff
R13: 0000000000000006 R14: 0000000000000000 R15: 0000000000000000
============================================
WARNING: possible recursive locking detected
4.14.171-syzkaller #0 Not tainted
--------------------------------------------
syz-executor498/7375 is trying to acquire lock:
(rtnl_mutex){+.+.}, at: [<ffffffff863793bb>] hsr_dev_destroy+0x1b/0xb0 net/hsr/hsr_device.c:373

but task is already holding lock:
(rtnl_mutex){+.+.}, at: [<ffffffff850246dd>] rtnl_lock net/core/rtnetlink.c:72 [inline]
(rtnl_mutex){+.+.}, at: [<ffffffff850246dd>] rtnetlink_rcv_msg+0x31d/0xb10 net/core/rtnetlink.c:4310

other info that might help us debug this:
Possible unsafe locking scenario:

CPU0
----
lock(rtnl_mutex);
lock(rtnl_mutex);

*** DEADLOCK ***

May be due to missing lock nesting notation

1 lock held by syz-executor498/7375:
#0: (rtnl_mutex){+.+.}, at: [<ffffffff850246dd>] rtnl_lock net/core/rtnetlink.c:72 [inline]
#0: (rtnl_mutex){+.+.}, at: [<ffffffff850246dd>] rtnetlink_rcv_msg+0x31d/0xb10 net/core/rtnetlink.c:4310

stack backtrace:
CPU: 1 PID: 7375 Comm: syz-executor498 Not tainted 4.14.171-syzkaller #0
RIP: 0033:0x4446a9
RSP: 002b:00007ffd8c71b7b8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004446a9
RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000003
RBP: 0000000000000004 R08: 0000000000000002 R09: 0000000000003231
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffff
R13: 0000000000000006 R14: 0000000000000000 R15: 0000000000000000

syzbot

unread,
Feb 27, 2020, 3:23:13 PM2/27/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: f25804f3 Linux 4.19.106
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15523645e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=a5f029a69ae922fd
dashboard link: https://syzkaller.appspot.com/bug?extid=e5f5b40aae74a763e22f
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+e5f5b4...@syzkaller.appspotmail.com

RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000003
RBP: 000000000076bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004
R13: 00000000000009f9 R14: 00000000004cc71a R15: 000000000000000b
============================================
WARNING: possible recursive locking detected
4.19.106-syzkaller #0 Not tainted
--------------------------------------------
syz-executor.2/17646 is trying to acquire lock:
00000000f239bb57 (rtnl_mutex){+.+.}, at: hsr_dev_destroy+0x1b/0xb0 net/hsr/hsr_device.c:373

but task is already holding lock:
00000000f239bb57 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline]
00000000f239bb57 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x3fe/0xaf0 net/core/rtnetlink.c:4774

other info that might help us debug this:
Possible unsafe locking scenario:

CPU0
----
lock(rtnl_mutex);
lock(rtnl_mutex);

*** DEADLOCK ***

May be due to missing lock nesting notation

1 lock held by syz-executor.2/17646:
#0: 00000000f239bb57 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline]
#0: 00000000f239bb57 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x3fe/0xaf0 net/core/rtnetlink.c:4774

stack backtrace:
CPU: 0 PID: 17646 Comm: syz-executor.2 Not tainted 4.19.106-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x188/0x20d lib/dump_stack.c:118
print_deadlock_bug kernel/locking/lockdep.c:1759 [inline]
check_deadlock kernel/locking/lockdep.c:1803 [inline]
validate_chain kernel/locking/lockdep.c:2399 [inline]
__lock_acquire.cold+0x20f/0x4a7 kernel/locking/lockdep.c:3411
lock_acquire+0x170/0x400 kernel/locking/lockdep.c:3903
__mutex_lock_common kernel/locking/mutex.c:925 [inline]
__mutex_lock+0xf7/0x1300 kernel/locking/mutex.c:1072
hsr_dev_destroy+0x1b/0xb0 net/hsr/hsr_device.c:373
register_netdevice+0xb8a/0xf50 net/core/dev.c:8761
hsr_dev_finalize+0x4f5/0x770 net/hsr/hsr_device.c:491
hsr_newlink+0x258/0x360 net/hsr/hsr_netlink.c:72
rtnl_newlink+0xf03/0x1440 net/core/rtnetlink.c:3141
rtnetlink_rcv_msg+0x453/0xaf0 net/core/rtnetlink.c:4777
netlink_rcv_skb+0x160/0x410 net/netlink/af_netlink.c:2454
netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline]
netlink_unicast+0x4d7/0x6a0 net/netlink/af_netlink.c:1343
netlink_sendmsg+0x80b/0xcd0 net/netlink/af_netlink.c:1908
sock_sendmsg_nosec net/socket.c:622 [inline]
sock_sendmsg+0xcf/0x120 net/socket.c:632
___sys_sendmsg+0x803/0x920 net/socket.c:2115
__sys_sendmsg+0xec/0x1b0 net/socket.c:2153
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45c479
Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f6318863c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f63188646d4 RCX: 000000000045c479
RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000003
RBP: 000000000076bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004
R13: 00000000000009f9 R14: 00000000004cc71a R15: 000000000000000b

syzbot

unread,
Feb 29, 2020, 6:53:11 AM2/29/20
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: a083db76 Linux 4.19.107
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14e32c55e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=c32f76aaadd644de
dashboard link: https://syzkaller.appspot.com/bug?extid=e5f5b40aae74a763e22f
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15cbd22de00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16dcd8f9e00000

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

RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000006
RBP: 000000000000000d R08: 0000000000000002 R09: 00007fff2f003131
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402080
R13: 0000000000402110 R14: 0000000000000000 R15: 0000000000000000
============================================
WARNING: possible recursive locking detected
4.19.107-syzkaller #0 Not tainted
--------------------------------------------
syz-executor925/8434 is trying to acquire lock:
00000000584890f3 (rtnl_mutex){+.+.}, at: hsr_dev_destroy+0x1b/0xb0 net/hsr/hsr_device.c:373

but task is already holding lock:
00000000584890f3 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline]
00000000584890f3 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x3fe/0xaf0 net/core/rtnetlink.c:4774

other info that might help us debug this:
Possible unsafe locking scenario:

CPU0
----
lock(rtnl_mutex);
lock(rtnl_mutex);

*** DEADLOCK ***

May be due to missing lock nesting notation

1 lock held by syz-executor925/8434:
#0: 00000000584890f3 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline]
#0: 00000000584890f3 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x3fe/0xaf0 net/core/rtnetlink.c:4774

stack backtrace:
CPU: 1 PID: 8434 Comm: syz-executor925 Not tainted 4.19.107-syzkaller #0
RIP: 0033:0x440799
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 5b 14 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fff2f726d88 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fff2f726d90 RCX: 0000000000440799
RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000006
RBP: 000000000000000d R08: 0000000000000002 R09: 00007fff2f003131
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402080
R13: 0000000000402110 R14: 0000000000000000 R15: 0000000000000000

Reply all
Reply to author
Forward
0 new messages