WARNING: locking bug in tomoyo_supervisor

Status: closed as dup on 2020/04/17 04:38
Subsystems: tomoyo
[Documentation on labels]
Reported-by: syzbot+1c36440b364ea3774701@syzkaller.appspotmail.com
First crash: 2419d, last: 2419d
Cause bisection: the cause commit could be any of (bisect log):
commit 9211bfbff80a7604273086fec5685efcdc10be2b
Author: Jeremy Sowden <jeremy@azazel.net>
Date: Wed Aug 7 14:17:00 2019 +0000

  netfilter: add missing IS_ENABLED(CONFIG_BRIDGE_NETFILTER) checks to header-file.

commit 47e640af2e492cc28778dd6f894d50313f7fba75
Author: Jeremy Sowden <jeremy@azazel.net>
Date: Wed Aug 7 14:17:01 2019 +0000

  netfilter: add missing IS_ENABLED(CONFIG_NF_TABLES) check to header-file.

commit a1b2f04ea527397fcacacd09e0d690927feef429
Author: Jeremy Sowden <jeremy@azazel.net>
Date: Wed Aug 7 14:16:59 2019 +0000

  netfilter: add missing includes to a number of header-files.

commit 0abc8bf4f2842e409926096f0fa009b468cbd855
Author: Jeremy Sowden <jeremy@azazel.net>
Date: Wed Aug 7 14:17:02 2019 +0000

  netfilter: add missing IS_ENABLED(CONFIG_NF_CONNTRACK) checks to some header-files.

commit bd96b4c75675e616eefef6d85d163530eef9c5e5
Author: Jeremy Sowden <jeremy@azazel.net>
Date: Wed Aug 7 14:16:58 2019 +0000

  netfilter: inline four headers files into another one.

commit 43dd16efc7f235f153804500a4363769bd2276fc
Author: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Thu Aug 1 12:09:26 2019 +0000

  netfilter: nf_tables: store data in offload context registers

commit 78458e3e08cda2aacaec9fde8c295dfc2f88618a
Author: Jeremy Sowden <jeremy@azazel.net>
Date: Wed Aug 7 14:17:03 2019 +0000

  netfilter: add missing IS_ENABLED(CONFIG_NETFILTER) checks to some header-files.

commit 20a9379d9a03ee0712d225035308973ecc5f6783
Author: Jeremy Sowden <jeremy@azazel.net>
Date: Wed Aug 7 14:17:04 2019 +0000

  netfilter: remove "#ifdef __KERNEL__" guards from some headers.

commit bd8699e9e29287b5571b32b68c3dcd05985fa9b1
Author: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Tue Jul 30 11:32:01 2019 +0000

  netfilter: nft_bitwise: add offload support

commit 2a475c409fe81a76fb26a6b023509d648237bbe6
Author: Jeremy Sowden <jeremy@azazel.net>
Date: Wed Aug 7 14:17:05 2019 +0000

  kbuild: remove all netfilter headers from header-test blacklist.

commit 7e59b3fea2a2510b52761c20ccc71d3e9f6b7db8
Author: yangxingwu <xingwu.yang@gmail.com>
Date: Tue Jul 16 02:13:01 2019 +0000

  netfilter: remove unnecessary spaces

commit 1b90af292e71b20d03b837d39406acfbdc5d4b2a
Author: Junwei Hu <hujunwei4@huawei.com>
Date: Wed Jul 31 16:03:30 2019 +0000

  ipvs: Improve robustness to the ipvs sysctl

commit 5785cf15fd74ec3b1a076fd39bc67382a8455fe7
Author: Valdis Klētnieks <valdis.kletnieks@vt.edu>
Date: Thu Aug 8 05:28:08 2019 +0000

  netfilter: nf_tables: add missing prototypes.

commit 0a30ba509fdeea740bedb81ce3bee4f74a759654
Author: Valdis Klētnieks <valdis.kletnieks@vt.edu>
Date: Thu Aug 8 05:43:22 2019 +0000

  netfilter: nf_nat_proto: make tables static

commit e84fb4b3666dabd3917952fb33588daa891a6ad3
Author: Matteo Croce <mcroce@redhat.com>
Date: Tue Jul 23 01:23:03 2019 +0000

  netfilter: conntrack: use shared sysctl constants

commit 105333435b4f3b21ffc325f32fae17719310db64
Author: Florian Westphal <fw@strlen.de>
Date: Mon Aug 12 11:40:04 2019 +0000

  netfilter: connlabels: prefer static lock initialiser

commit 8c0bb7873815bf8c3c4dfb24e8ebf4fefb4c35d2
Author: Fernando Fernandez Mancera <ffmancera@riseup.net>
Date: Wed Jul 10 10:05:59 2019 +0000

  netfilter: synproxy: rename mss synproxy_options field

commit c162610c7db2e9611a7b3ec806f9c97fcfec0b0b
Author: Jakub Kicinski <jakub.kicinski@netronome.com>
Date: Wed Aug 14 01:22:57 2019 +0000

  Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next
▶ ▼ Duplicate of
Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported
WARNING: locking bug in inet_autobind net 4 syz, C done error 103 1429d 2752d
▶ ▼ Discussions (1)
Title Replies (including bot) Last reply
WARNING: locking bug in tomoyo_supervisor 4 (5) 2020/04/23 02:58

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 8602 at kernel/locking/lockdep.c:873 look_up_lock_class+0x207/0x280 kernel/locking/lockdep.c:863
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 8602 Comm: syz-executor.5 Not tainted 5.6.0-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+0x1e9/0x30e lib/dump_stack.c:118
 panic+0x264/0x7a0 kernel/panic.c:221
 __warn+0x102/0x210 kernel/panic.c:574
 look_up_lock_class+0x207/0x280 kernel/locking/lockdep.c:863
 __warn+0x209/0x210 kernel/panic.c:582
 look_up_lock_class+0x207/0x280 kernel/locking/lockdep.c:863
 report_bug+0x1ac/0x2d0 lib/bug.c:195
 fixup_bug arch/x86/kernel/traps.c:175 [inline]
 do_error_trap+0xca/0x1c0 arch/x86/kernel/traps.c:267
 do_invalid_op+0x32/0x40 arch/x86/kernel/traps.c:286
 look_up_lock_class+0x207/0x280 kernel/locking/lockdep.c:863
 invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1027
RIP: 0010:look_up_lock_class+0x207/0x280 kernel/locking/lockdep.c:863
Code: 3d 91 8c 12 08 00 0f 85 35 ff ff ff 31 db 48 c7 c7 19 59 e5 88 48 c7 c6 03 ea e6 88 31 c0 e8 10 18 ec ff 0f 0b e9 7b ff ff ff <0f> 0b e9 74 ff ff ff 48 c7 c1 30 4d 55 8b 80 e1 07 80 c1 03 38 c1
RSP: 0018:ffffc90006017a98 EFLAGS: 00010002
RAX: ffffffff8ab05460 RBX: ffffffff8ad678f8 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff888096695860
RBP: ffff888096695878 R08: 0000000000000001 R09: 0000000000000000
R10: fffffbfff12d7735 R11: 0000000000000000 R12: 1ffff11012cd2b0c
R13: ffffffff89063ea9 R14: ffff888096695860 R15: dffffc0000000000
 register_lock_class+0x97/0x10d0 kernel/locking/lockdep.c:1220
 tomoyo_supervisor+0x13d/0x1310 security/tomoyo/common.c:2076
 __lock_acquire+0x102/0x2c30 kernel/locking/lockdep.c:4234
 rcu_lock_release+0x5/0x20 include/linux/rcupdate.h:212
 srcu_read_unlock include/linux/srcu.h:181 [inline]
 tomoyo_read_unlock security/tomoyo/common.h:1123 [inline]
 tomoyo_inet_entry security/tomoyo/network.c:487 [inline]
 tomoyo_check_inet_address+0x661/0x8e0 security/tomoyo/network.c:532
 lock_acquire+0x169/0x480 kernel/locking/lockdep.c:4934
 spin_lock_bh include/linux/spinlock.h:358 [inline]
 lock_sock_nested+0x43/0x110 net/core/sock.c:2959

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/04/12 21:54 upstream 4f8a3cc1183c 36b0b050 .config console log report syz ci-upstream-kasan-gce-smack-root
* Struck through repros no longer work on HEAD.