syzbot


WARNING: locking bug in selinux_netlbl_socket_connect

Status: auto-obsoleted due to no activity on 2023/05/08 04:25
Subsystems: selinux
[Documentation on labels]
Reported-by: syzbot+5fa07e4e18e4eb1ccb12@syzkaller.appspotmail.com
First crash: 1728d, last: 436d
Cause bisection: the cause commit could be any of (bisect log):
  9211bfbff80a netfilter: add missing IS_ENABLED(CONFIG_BRIDGE_NETFILTER) checks to header-file.
  47e640af2e49 netfilter: add missing IS_ENABLED(CONFIG_NF_TABLES) check to header-file.
  a1b2f04ea527 netfilter: add missing includes to a number of header-files.
  0abc8bf4f284 netfilter: add missing IS_ENABLED(CONFIG_NF_CONNTRACK) checks to some header-files.
  bd96b4c75675 netfilter: inline four headers files into another one.
  43dd16efc7f2 netfilter: nf_tables: store data in offload context registers
  78458e3e08cd netfilter: add missing IS_ENABLED(CONFIG_NETFILTER) checks to some header-files.
  20a9379d9a03 netfilter: remove "#ifdef __KERNEL__" guards from some headers.
  bd8699e9e292 netfilter: nft_bitwise: add offload support
  2a475c409fe8 kbuild: remove all netfilter headers from header-test blacklist.
  7e59b3fea2a2 netfilter: remove unnecessary spaces
  1b90af292e71 ipvs: Improve robustness to the ipvs sysctl
  5785cf15fd74 netfilter: nf_tables: add missing prototypes.
  0a30ba509fde netfilter: nf_nat_proto: make tables static
  e84fb4b3666d netfilter: conntrack: use shared sysctl constants
  105333435b4f netfilter: connlabels: prefer static lock initialiser
  8c0bb7873815 netfilter: synproxy: rename mss synproxy_options field
  c162610c7db2 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next
  
Fix bisection: failed (error log, bisect log)
  
Discussions (1)
Title Replies (including bot) Last reply
WARNING: locking bug in selinux_netlbl_socket_connect 5 (6) 2019/09/29 01:12
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 WARNING: locking bug in selinux_netlbl_socket_connect syz error 13 1256d 1668d 0/1 upstream: reported syz repro on 2019/08/24 07:50
Last patch testing requests (7)
Created Duration User Patch Repo Result
2023/04/18 07:40 19m retest repro upstream OK log
2023/04/18 06:40 28m retest repro upstream OK log
2023/04/18 05:40 29m retest repro upstream OK log
2023/04/18 04:40 18m retest repro upstream OK log
2023/01/08 03:31 14m retest repro upstream report log
2022/09/30 00:30 10m retest repro upstream report log
2022/08/31 03:27 20m retest repro upstream OK log
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2019/12/22 04:11 20m bisect fix upstream error job log (0)
2019/10/21 15:49 32m bisect fix upstream job log (0) log

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 9765 at kernel/locking/lockdep.c:894 look_up_lock_class kernel/locking/lockdep.c:894 [inline]
WARNING: CPU: 1 PID: 9765 at kernel/locking/lockdep.c:894 register_lock_class+0x1fb/0x1100 kernel/locking/lockdep.c:1242
Modules linked in:
CPU: 1 PID: 9765 Comm: syz-executor.0 Not tainted 5.11.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:look_up_lock_class kernel/locking/lockdep.c:894 [inline]
RIP: 0010:register_lock_class+0x1fb/0x1100 kernel/locking/lockdep.c:1242
Code: 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 21 0d 00 00 4d 3b 67 18 74 0b 49 81 3f c0 f2 15 8f 74 02 <0f> 0b 85 ed 0f 84 20 01 00 00 f6 44 24 04 01 0f 85 15 01 00 00 83
RSP: 0018:ffffc900097b7a28 EFLAGS: 00010006
RAX: dffffc0000000000 RBX: 1ffff920012f6f4c RCX: ffffffff8fc02660
RDX: 1ffff1100688621f RSI: 0000000000000000 RDI: ffff8880344310f8
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff8a434b80
R13: ffffffff90759740 R14: ffffffff8f8c0b00 R15: ffff8880344310e0
FS:  00007fa72344f700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000053b198 CR3: 000000001246e000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __lock_acquire+0x101/0x54f0 kernel/locking/lockdep.c:4711
 lock_acquire kernel/locking/lockdep.c:5442 [inline]
 lock_acquire+0x1a8/0x720 kernel/locking/lockdep.c:5407
 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline]
 _raw_spin_lock_bh+0x2f/0x40 kernel/locking/spinlock.c:175
 spin_lock_bh include/linux/spinlock.h:359 [inline]
 lock_sock_nested+0x3b/0x110 net/core/sock.c:3049
 lock_sock include/net/sock.h:1594 [inline]
 selinux_netlbl_socket_connect+0x18/0x40 security/selinux/netlabel.c:607
 selinux_socket_connect+0x65/0x80 security/selinux/hooks.c:4808
 security_socket_connect+0x50/0xb0 security/security.c:2126
 __sys_connect_file+0xa2/0x1a0 net/socket.c:1831
 __sys_connect+0x161/0x190 net/socket.c:1852
 __do_sys_connect net/socket.c:1862 [inline]
 __se_sys_connect net/socket.c:1859 [inline]
 __x64_sys_connect+0x6f/0xb0 net/socket.c:1859
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x465d99
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fa72344f188 EFLAGS: 00000246 ORIG_RAX: 000000000000002a
RAX: ffffffffffffffda RBX: 000000000056c008 RCX: 0000000000465d99
RDX: 000000000000001c RSI: 0000000020000080 RDI: 0000000000000004
RBP: 00000000004bcf27 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c008
R13: 00007fff30b026ef R14: 00007fa72344f300 R15: 0000000000022000

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/02/17 14:33 upstream f40ddce88593 052f8d9f .config console log report syz ci-upstream-kasan-gce-selinux-root WARNING: locking bug in selinux_netlbl_socket_connect
2020/09/01 06:39 upstream f75aef392f86 d5a3ae1f .config console log report syz ci-upstream-kasan-gce-selinux-root
2020/07/26 17:39 upstream 04300d66f0a0 51265195 .config console log report syz ci-qemu-upstream
2019/11/21 11:13 upstream c74386d50fba 8098ea0f .config console log report syz ci-upstream-kasan-gce-selinux-root
2019/09/21 15:49 upstream f97c81dc6ca5 d96e88f3 .config console log report syz ci-upstream-kasan-gce-selinux-root
2021/11/15 11:01 upstream ce49bfc8d037 83f5c9b5 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: locking bug in selinux_netlbl_socket_connect
2020/12/16 04:12 upstream d635a69dd498 f213e07e .config console log report info ci-upstream-kasan-gce-selinux-root
2020/11/24 07:50 upstream d5beb3140f91 1ab681a4 .config console log report info ci-upstream-kasan-gce-selinux-root
2020/09/19 12:36 upstream eb5f95f1593f 53ce8104 .config console log report info ci-upstream-kasan-gce-selinux-root
2019/06/25 09:55 upstream 4b972a01a7da 82c13b6b .config console log report ci-upstream-kasan-gce-selinux-root
* Struck through repros no longer work on HEAD.