syzbot


possible deadlock in rtnl_lock

Status: upstream: reported C repro on 2020/01/06 01:18
Reported-by: syzbot+01eabdd756dc11fa28e2@syzkaller.appspotmail.com
First crash: 1573d, last: 1322d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (9)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-44 possible deadlock in rtnl_lock C 4676 1649d 1842d 0/2 public: reported C repro on 2019/04/12 00:00
upstream possible deadlock in rtnl_lock (5) net C 1009 2193d 2222d 5/26 fixed on 2018/05/08 18:30
upstream possible deadlock in rtnl_lock (3) net C 3633 2270d 2271d 4/26 fixed on 2018/02/07 13:48
upstream possible deadlock in rtnl_lock (4) net C 73333 2253d 2270d 4/26 fixed on 2018/02/26 20:04
upstream possible deadlock in rtnl_lock (6) net C done error 551 1512d 1754d 0/26 auto-obsoleted due to no activity on 2022/12/21 11:47
android-49 possible deadlock in rtnl_lock C 2906 2072d 2223d 0/3 closed as invalid on 2019/04/05 05:43
upstream possible deadlock in rtnl_lock net C 15711 2276d 2333d 4/26 fixed on 2018/02/01 04:00
upstream possible deadlock in rtnl_lock (2) net C 10369 2273d 2276d 4/26 fixed on 2018/02/04 23:45
linux-4.14 possible deadlock in rtnl_lock C inconclusive 312 1431d 1573d 0/1 upstream: reported C repro on 2020/01/06 01:45
Fix bisection attempts (8)
Created Duration User Patch Repo Result
2020/10/12 08:26 4m bisect fix linux-4.19.y error job log (0)
2020/09/12 07:56 29m bisect fix linux-4.19.y job log (0) log
2020/08/13 07:29 27m bisect fix linux-4.19.y job log (0) log
2020/07/14 07:04 25m bisect fix linux-4.19.y job log (0) log
2020/06/14 06:33 24m bisect fix linux-4.19.y job log (0) log
2020/05/15 06:05 28m bisect fix linux-4.19.y job log (0) log
2020/04/15 05:39 26m bisect fix linux-4.19.y job log (0) log
2020/03/16 05:12 26m bisect fix linux-4.19.y job log (0) log

Sample crash report:
audit: type=1400 audit(1578290952.032:36): avc:  denied  { map } for  pid=7985 comm="syz-executor254" path="/root/syz-executor254769414" dev="sda1" ino=16483 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
netlink: 20 bytes leftover after parsing attributes in process `syz-executor254'.
netlink: 20 bytes leftover after parsing attributes in process `syz-executor254'.
============================================
WARNING: possible recursive locking detected
4.19.93-syzkaller #0 Not tainted
--------------------------------------------
syz-executor254/7985 is trying to acquire lock:
00000000076d622b (rtnl_mutex){+.+.}, at: rtnl_lock+0x17/0x20 net/core/rtnetlink.c:77

but task is already holding lock:
00000000076d622b (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline]
00000000076d622b (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x40a/0xb00 net/core/rtnetlink.c:4765

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-executor254/7985:
 #0: 00000000076d622b (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline]
 #0: 00000000076d622b (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x40a/0xb00 net/core/rtnetlink.c:4765

stack backtrace:
CPU: 1 PID: 7985 Comm: syz-executor254 Not tainted 4.19.93-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+0x197/0x210 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+0x16f/0x3f0 kernel/locking/lockdep.c:3903
 __mutex_lock_common kernel/locking/mutex.c:925 [inline]
 __mutex_lock+0xf7/0x1300 kernel/locking/mutex.c:1072
 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087
 rtnl_lock+0x17/0x20 net/core/rtnetlink.c:77
 hsr_dev_destroy+0x1f/0xc0 net/hsr/hsr_device.c:371
 register_netdevice+0xc3c/0xff0 net/core/dev.c:8599
 hsr_dev_finalize+0x4fc/0x780 net/hsr/hsr_device.c:489
 hsr_newlink+0x26b/0x380 net/hsr/hsr_netlink.c:72
 rtnl_newlink+0x1042/0x1600 net/core/rtnetlink.c:3132
 rtnetlink_rcv_msg+0x463/0xb00 net/core/rtnetlink.c:4768
 netlink_rcv_skb+0x17d/0x460 net/netlink/af_netlink.c:2454
 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:4786
 netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline]
 netlink_unicast+0x53a/0x730 net/netlink/af_netlink.c:1343
 netlink_sendmsg+0x8ae/0xd70 net/netlink/af_netlink.c:1908
 sock_sendmsg_nosec net/socket.c:622 [inline]
 sock_sendmsg+0xd7/0x130 net/socket.c:632
 ___sys_sendmsg+0x803/0x920 net/socket.c:2115
 __sys_sendmsg+0x105/0x1d0 net/socket.c:2153
 __do_sys_sendmsg net/socket.c:2162 [inline]
 __se_sys_sendmsg net/socket.c:2160 [inline]
 __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2160
 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4408e9
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 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffe0b69f9b8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004408e9
RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000000000003
RBP: 00000000006cb018 R08: 0000000000000002 R09: 00000000004002c8
R10: 0000000000000014 R11: 0000000000000246 R12: 0000000000402170
R13: 0000000000402200 R14: 0000000000000000 R15: 0000000000000000

Crashes (31):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/01/06 06:12 linux-4.19.y 3d40d7117e35 438e1227 .config console log report syz C ci2-linux-4-19
2020/01/06 05:08 linux-4.19.y 3d40d7117e35 438e1227 .config console log report syz C ci2-linux-4-19
2020/01/06 02:05 linux-4.19.y 3d40d7117e35 438e1227 .config console log report syz C ci2-linux-4-19
2020/02/15 03:56 linux-4.19.y 9b15f7fae677 5d7b90f1 .config console log report ci2-linux-4-19
2020/02/14 18:13 linux-4.19.y 357668399cf7 5d7b90f1 .config console log report ci2-linux-4-19
2020/02/07 21:20 linux-4.19.y b499cf4b3a90 06150bf1 .config console log report ci2-linux-4-19
2020/02/06 07:41 linux-4.19.y b499cf4b3a90 662cf49a .config console log report ci2-linux-4-19
2020/02/04 06:54 linux-4.19.y 32ee7492f104 93e5e335 .config console log report ci2-linux-4-19
2020/02/03 19:08 linux-4.19.y 32ee7492f104 93e5e335 .config console log report ci2-linux-4-19
2020/02/01 15:09 linux-4.19.y 32ee7492f104 326d4c78 .config console log report ci2-linux-4-19
2020/01/30 17:04 linux-4.19.y 7cdefde351b6 5ed23f9a .config console log report ci2-linux-4-19
2020/01/29 13:15 linux-4.19.y 88d6de67e390 c8e81ce4 .config console log report ci2-linux-4-19
2020/01/25 08:31 linux-4.19.y d183c8e2647a 2e95ab33 .config console log report ci2-linux-4-19
2020/01/24 05:47 linux-4.19.y d183c8e2647a 11ebf937 .config console log report ci2-linux-4-19
2020/01/22 14:25 linux-4.19.y dc4ba5be1bab 8eda0b95 .config console log report ci2-linux-4-19
2020/01/21 02:52 linux-4.19.y dc4ba5be1bab 8eda0b95 .config console log report ci2-linux-4-19
2020/01/20 21:08 linux-4.19.y dc4ba5be1bab c40da18c .config console log report ci2-linux-4-19
2020/01/20 09:30 linux-4.19.y dc4ba5be1bab 0342f8c7 .config console log report ci2-linux-4-19
2020/01/18 19:47 linux-4.19.y dc4ba5be1bab 3de7aabb .config console log report ci2-linux-4-19
2020/01/17 22:07 linux-4.19.y dc4ba5be1bab 3de7aabb .config console log report ci2-linux-4-19
2020/01/16 21:17 linux-4.19.y db5b9190ff82 3de7aabb .config console log report ci2-linux-4-19
2020/01/15 12:44 linux-4.19.y db5b9190ff82 fa12bd3c .config console log report ci2-linux-4-19
2020/01/14 07:38 linux-4.19.y dcd888983542 32881205 .config console log report ci2-linux-4-19
2020/01/11 17:01 linux-4.19.y cb1f9a169a0e 4c04afaa .config console log report ci2-linux-4-19
2020/01/11 09:28 linux-4.19.y cb1f9a169a0e 4c04afaa .config console log report ci2-linux-4-19
2020/01/09 13:36 linux-4.19.y cb1f9a169a0e ddc3e859 .config console log report ci2-linux-4-19
2020/01/09 09:07 linux-4.19.y 3d40d7117e35 ddc3e859 .config console log report ci2-linux-4-19
2020/01/09 08:58 linux-4.19.y 3d40d7117e35 ddc3e859 .config console log report ci2-linux-4-19
2020/01/08 19:28 linux-4.19.y 3d40d7117e35 ddc3e859 .config console log report ci2-linux-4-19
2020/01/06 17:19 linux-4.19.y 3d40d7117e35 438e1227 .config console log report ci2-linux-4-19
2020/01/06 01:17 linux-4.19.y 3d40d7117e35 438e1227 .config console log report ci2-linux-4-19
* Struck through repros no longer work on HEAD.