audit: type=1400 audit(1519126711.892:11): avc: denied { net_raw } for pid=4186 comm="syzkaller015297" capability=13 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 ===================================== WARNING: bad unlock balance detected! 4.16.0-rc2+ #322 Not tainted ------------------------------------- syzkaller015297/4186 is trying to release lock (rcu_read_lock_bh) at: [] rcu_read_unlock_bh include/linux/rcupdate.h:722 [inline] [] hashlimit_mt_common.isra.10+0x1beb/0x2610 net/netfilter/xt_hashlimit.c:777 but there are no more locks to release! other info that might help us debug this: 5 locks held by syzkaller015297/4186: #0: (rtnl_mutex){+.+.}, at: [<00000000d5e67655>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 #1: (rcu_read_lock){....}, at: [<0000000054f82181>] __fib6_clean_all+0x0/0x3a0 net/ipv6/ip6_fib.c:1583 #2: ((&idev->mc_ifc_timer)){+.-.}, at: [<000000002caff148>] lockdep_copy_map include/linux/lockdep.h:178 [inline] #2: ((&idev->mc_ifc_timer)){+.-.}, at: [<000000002caff148>] call_timer_fn+0x1c6/0x820 kernel/time/timer.c:1316 #3: (rcu_read_lock){....}, at: [<000000004da3c740>] read_pnet include/net/net_namespace.h:280 [inline] #3: (rcu_read_lock){....}, at: [<000000004da3c740>] dev_net include/linux/netdevice.h:2050 [inline] #3: (rcu_read_lock){....}, at: [<000000004da3c740>] mld_sendpack+0x180/0xe70 net/ipv6/mcast.c:1625 #4: (rcu_read_lock){....}, at: [<00000000cc4797e7>] nf_hook.constprop.37+0x0/0x830 net/ipv6/mcast.c:2795 stack backtrace: CPU: 1 PID: 4186 Comm: syzkaller015297 Not tainted 4.16.0-rc2+ #322 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+0x194/0x257 lib/dump_stack.c:53 print_unlock_imbalance_bug+0x12f/0x140 kernel/locking/lockdep.c:3484 __lock_release kernel/locking/lockdep.c:3691 [inline] lock_release+0x6fe/0xa40 kernel/locking/lockdep.c:3939 rcu_lock_release include/linux/rcupdate.h:249 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:724 [inline] hashlimit_mt_common.isra.10+0x1c08/0x2610 net/netfilter/xt_hashlimit.c:777 hashlimit_mt+0x78/0x90 net/netfilter/xt_hashlimit.c:846 ip6t_do_table+0x98d/0x1a30 net/ipv6/netfilter/ip6_tables.c:319 ip6table_raw_hook+0x65/0x80 net/ipv6/netfilter/ip6table_raw.c:42 nf_hook_entry_hookfn include/linux/netfilter.h:120 [inline] nf_hook_slow+0xba/0x1a0 net/netfilter/core.c:483 nf_hook.constprop.37+0x3f6/0x830 include/linux/netfilter.h:243 NF_HOOK include/linux/netfilter.h:286 [inline] mld_sendpack+0x6c2/0xe70 net/ipv6/mcast.c:1658 mld_send_cr net/ipv6/mcast.c:1954 [inline] mld_ifc_timer_expire+0x3d9/0x770 net/ipv6/mcast.c:2451 call_timer_fn+0x228/0x820 kernel/time/timer.c:1326 expire_timers kernel/time/timer.c:1363 [inline] __run_timers+0x7ee/0xb70 kernel/time/timer.c:1666 run_timer_softirq+0x4c/0x70 kernel/time/timer.c:1692 __do_softirq+0x2d7/0xb85 kernel/softirq.c:285 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1011 do_softirq.part.19+0x14d/0x190 kernel/softirq.c:329 do_softirq kernel/softirq.c:177 [inline] __local_bh_enable_ip+0x1ee/0x230 kernel/softirq.c:182 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:176 [inline] _raw_spin_unlock_bh+0x30/0x40 kernel/locking/spinlock.c:200 spin_unlock_bh include/linux/spinlock.h:355 [inline] __fib6_clean_all+0x1fc/0x3a0 net/ipv6/ip6_fib.c:1987 fib6_clean_all+0x27/0x30 net/ipv6/ip6_fib.c:1996 rt6_sync_down_dev net/ipv6/route.c:3777 [inline] rt6_disable_ip+0xfd/0x700 net/ipv6/route.c:3782 addrconf_ifdown+0x14b/0x14f0 net/ipv6/addrconf.c:3596 addrconf_notify+0x5f8/0x2310 net/ipv6/addrconf.c:3520 notifier_call_chain+0x136/0x2c0 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2d/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x32/0x70 net/core/dev.c:1707 call_netdevice_notifiers net/core/dev.c:1725 [inline] dev_close_many+0x3fb/0x850 net/core/dev.c:1504 rollback_registered_many+0x4d5/0xe20 net/core/dev.c:7371 rollback_registered+0x1be/0x3c0 net/core/dev.c:7436 unregister_netdevice_queue+0x2e3/0x5f0 net/core/dev.c:8450 unregister_netdevice include/linux/netdevice.h:2473 [inline] __tun_detach+0x520/0x10b0 drivers/net/tun.c:736 tun_detach drivers/net/tun.c:746 [inline] tun_chr_close+0x44/0x60 drivers/net/tun.c:3175 __fput+0x327/0x7e0 fs/file_table.c:209 ____fput+0x15/0x20 fs/file_table.c:243 task_work_run+0x199/0x270 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x9bb/0x1ad0 kernel/exit.c:865 do_group_exit+0x149/0x400 kernel/exit.c:968 SYSC_exit_group kernel/exit.c:979 [inline] SyS_exit_group+0x1d/0x20 kernel/exit.c:977 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x4467f9 RSP: 002b:00000000007efde8 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 00000000004467f9 RDX: 00000000004466f0 RSI: 0000000000000001 RDI: 0000000000000001 RBP: 0000000000000068 R08: 0000000120080522 R09: 0000000000000000 R10: 00000000000004a8 R11: 00000000000