netlink: 3 bytes leftover after parsing attributes in process `syz-executor7'. kernel msg: ebtables bug: please report to author: nentries does not equal the nr of entries in the chain kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN kasan: CONFIG_KASAN_INLINE enabled Dumping ftrace buffer: kasan: GPF could be caused by NULL-ptr deref or user memory access (ftrace buffer empty) Modules linked in: CPU: 1 PID: 16145 Comm: syz-executor1 Not tainted 4.16.0-rc7+ #278 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__debug_check_no_obj_freed lib/debugobjects.c:737 [inline] RIP: 0010:debug_check_no_obj_freed+0x239/0xf1f lib/debugobjects.c:774 RSP: 0018:ffff8801d0a1dac0 EFLAGS: 00010807 RAX: 0000000000000004 RBX: 90316c5f90316c5f RCX: 0000000000000282 RDX: 12062d8bf2062d8b RSI: 1ffff1003746da42 RDI: ffff8801ba36d210 RBP: ffff8801d0a1dc90 R08: 1ffff1003a143a95 R09: ffff88019d800000 R10: ffffed003a143b7d R11: ffff88019da00000 R12: ffffed003a143b6d R13: ffff8801d0a1dc68 R14: 90316c5f90316c5f R15: dffffc0000000000 FS: 0000000000000000(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 0000000008117654 CR3: 0000000007a22005 CR4: 00000000001606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: free_pages_prepare mm/page_alloc.c:1069 [inline] __free_pages_ok+0x765/0x31e0 mm/page_alloc.c:1264 free_compound_page+0x5c/0x70 mm/page_alloc.c:605 free_transhuge_page+0x2d2/0x430 mm/huge_memory.c:2733 __put_compound_page+0x88/0xc0 mm/swap.c:95 release_pages+0x64b/0x1230 mm/swap.c:760 free_pages_and_swap_cache+0x2ad/0x400 mm/swap_state.c:322 tlb_flush_mmu_free+0xb4/0x160 mm/memory.c:259 zap_pte_range mm/memory.c:1404 [inline] zap_pmd_range mm/memory.c:1441 [inline] zap_pud_range mm/memory.c:1470 [inline] zap_p4d_range mm/memory.c:1491 [inline] unmap_page_range+0x181e/0x22e0 mm/memory.c:1512 unmap_single_vma+0x15f/0x2d0 mm/memory.c:1557 unmap_vmas+0xf1/0x1b0 mm/memory.c:1587 exit_mmap+0x23a/0x500 mm/mmap.c:3020 __mmput kernel/fork.c:960 [inline] mmput+0x223/0x6d0 kernel/fork.c:981 exit_mm kernel/exit.c:544 [inline] do_exit+0x90a/0x1ad0 kernel/exit.c:852 do_group_exit+0x149/0x400 kernel/exit.c:968 get_signal+0x73a/0x16d0 kernel/signal.c:2469 do_signal+0x90/0x1e90 arch/x86/kernel/signal.c:809 exit_to_usermode_loop+0x258/0x2f0 arch/x86/entry/common.c:162 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline] syscall_return_slowpath arch/x86/entry/common.c:265 [inline] do_syscall_32_irqs_on arch/x86/entry/common.c:336 [inline] do_fast_syscall_32+0xbe6/0xf9f arch/x86/entry/common.c:392 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7ff4c99 RSP: 002b:00000000f77cf10c EFLAGS: 00000296 ORIG_RAX: 00000000000000f0 RAX: fffffffffffffe00 RBX: 000000000813af98 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Code: 4d 85 f6 0f 84 d7 04 00 00 4d 8d 55 80 4c 8b 9d 80 fe ff ff 4c 8b 8d 88 fe ff ff 31 c0 49 c1 ea 03 4d 01 fa 4c 89 f2 48 c1 ea 03 <42> 80 3c 3a 00 0f 85 06 05 00 00 49 8d 7e 18 83 c0 01 49 8b 16 RIP: __debug_check_no_obj_freed lib/debugobjects.c:737 [inline] RSP: ffff8801d0a1dac0 RIP: debug_check_no_obj_freed+0x239/0xf1f lib/debugobjects.c:774 RSP: ffff8801d0a1dac0 ====================================================== WARNING: possible circular locking dependency detected 4.16.0-rc7+ #278 Not tainted ------------------------------------------------------ syz-executor1/16145 is trying to acquire lock: ((console_sem).lock){-.-.}, at: [<00000000e71c352c>] down_trylock+0x13/0x70 kernel/locking/semaphore.c:136 but task is already holding lock: (&obj_hash[i].lock){-.-.}, at: [<0000000060781ed8>] __debug_check_no_obj_freed lib/debugobjects.c:736 [inline] (&obj_hash[i].lock){-.-.}, at: [<0000000060781ed8>] debug_check_no_obj_freed+0x1e9/0xf1f lib/debugobjects.c:774 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&obj_hash[i].lock){-.-.}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x96/0xc0 kernel/locking/spinlock.c:152 __debug_object_init+0x109/0x1040 lib/debugobjects.c:343 debug_object_init+0x17/0x20 lib/debugobjects.c:391 debug_hrtimer_init kernel/time/hrtimer.c:410 [inline] debug_init kernel/time/hrtimer.c:458 [inline] hrtimer_init+0x8c/0x410 kernel/time/hrtimer.c:1259 init_dl_task_timer+0x1b/0x50 kernel/sched/deadline.c:1060 __sched_fork+0x2bb/0xb60 kernel/sched/core.c:2189 init_idle+0x75/0x820 kernel/sched/core.c:5352 sched_init+0xb19/0xc43 kernel/sched/core.c:6049 start_kernel+0x452/0x819 init/main.c:586 x86_64_start_reservations+0x2a/0x2c arch/x86/kernel/head64.c:378 x86_64_start_kernel+0x77/0x7a arch/x86/kernel/head64.c:359 secondary_startup_64+0xa5/0xb0 arch/x86/kernel/head_64.S:239 -> #2 (&rq->lock){-.-.}: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 rq_lock kernel/sched/sched.h:1760 [inline] task_fork_fair+0x7a/0x690 kernel/sched/fair.c:9471 sched_fork+0x450/0xc10 kernel/sched/core.c:2405 copy_process.part.38+0x17c9/0x4bd0 kernel/fork.c:1763 copy_process kernel/fork.c:1606 [inline] _do_fork+0x1f7/0xf70 kernel/fork.c:2087 kernel_thread+0x34/0x40 kernel/fork.c:2146 rest_init+0x22/0xf0 init/main.c:403 start_kernel+0x7f1/0x819 init/main.c:717 x86_64_start_reservations+0x2a/0x2c arch/x86/kernel/head64.c:378 x86_64_start_kernel+0x77/0x7a arch/x86/kernel/head64.c:359 secondary_startup_64+0xa5/0xb0 arch/x86/kernel/head_64.S:239 -> #1 (&p->pi_lock){-.-.}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x96/0xc0 kernel/locking/spinlock.c:152 try_to_wake_up+0xbc/0x15f0 kernel/sched/core.c:1989 wake_up_process+0x10/0x20 kernel/sched/core.c:2152 __up.isra.0+0x1cc/0x2c0 kernel/locking/semaphore.c:262 up+0x13b/0x1d0 kernel/locking/semaphore.c:187 __up_console_sem+0xb2/0x1a0 kernel/printk/printk.c:242 console_unlock+0x5af/0xfb0 kernel/printk/printk.c:2417 vprintk_emit+0x5c3/0xb90 kernel/printk/printk.c:1907 vprintk_default+0x28/0x30 kernel/printk/printk.c:1947 vprintk_func+0x57/0xc0 kernel/printk/printk_safe.c:379 printk+0xaa/0xca kernel/printk/printk.c:1980 regdb_fw_cb+0x1d7/0x220 net/wireless/reg.c:886 request_firmware_work_func+0x151/0x2c0 drivers/base/firmware_class.c:1442 process_one_work+0xc47/0x1bb0 kernel/workqueue.c:2113 worker_thread+0x223/0x1990 kernel/workqueue.c:2247 kthread+0x33c/0x400 kernel/kthread.c:238 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:406 -> #0 ((console_sem).lock){-.-.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x96/0xc0 kernel/locking/spinlock.c:152 down_trylock+0x13/0x70 kernel/locking/semaphore.c:136 __down_trylock_console_sem+0xa2/0x1e0 kernel/printk/printk.c:225 console_trylock+0x15/0x70 kernel/printk/printk.c:2229 console_trylock_spinning kernel/printk/printk.c:1643 [inline] vprintk_emit+0x5b5/0xb90 kernel/printk/printk.c:1906 vprintk_default+0x28/0x30 kernel/printk/printk.c:1947 vprintk_func+0x57/0xc0 kernel/printk/printk_safe.c:379 printk+0xaa/0xca kernel/printk/printk.c:1980 kasan_die_handler+0x31/0x3f arch/x86/mm/kasan_init_64.c:247 notifier_call_chain+0x136/0x2c0 kernel/notifier.c:93 __atomic_notifier_call_chain kernel/notifier.c:183 [inline] atomic_notifier_call_chain+0x77/0x140 kernel/notifier.c:193 notify_die+0x18c/0x280 kernel/notifier.c:549 do_general_protection+0x331/0x3e0 arch/x86/kernel/traps.c:558 general_protection+0x25/0x50 arch/x86/entry/entry_64.S:1150 __debug_check_no_obj_freed lib/debugobjects.c:737 [inline] debug_check_no_obj_freed+0x239/0xf1f lib/debugobjects.c:774 free_pages_prepare mm/page_alloc.c:1069 [inline] __free_pages_ok+0x765/0x31e0 mm/page_alloc.c:1264 free_compound_page+0x5c/0x70 mm/page_alloc.c:605 free_transhuge_page+0x2d2/0x430 mm/huge_memory.c:2733 __put_compound_page+0x88/0xc0 mm/swap.c:95 release_pages+0x64b/0x1230 mm/swap.c:760 free_pages_and_swap_cache+0x2ad/0x400 mm/swap_state.c:322 tlb_flush_mmu_free+0xb4/0x160 mm/memory.c:259 zap_pte_range mm/memory.c:1404 [inline] zap_pmd_range mm/memory.c:1441 [inline] zap_pud_range mm/memory.c:1470 [inline] zap_p4d_range mm/memory.c:1491 [inline] unmap_page_range+0x181e/0x22e0 mm/memory.c:1512 unmap_single_vma+0x15f/0x2d0 mm/memory.c:1557 unmap_vmas+0xf1/0x1b0 mm/memory.c:1587 exit_mmap+0x23a/0x500 mm/mmap.c:3020 __mmput kernel/fork.c:960 [inline] mmput+0x223/0x6d0 kernel/fork.c:981 exit_mm kernel/exit.c:544 [inline] do_exit+0x90a/0x1ad0 kernel/exit.c:852 do_group_exit+0x149/0x400 kernel/exit.c:968 get_signal+0x73a/0x16d0 kernel/signal.c:2469 do_signal+0x90/0x1e90 arch/x86/kernel/signal.c:809 exit_to_usermode_loop+0x258/0x2f0 arch/x86/entry/common.c:162 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline] syscall_return_slowpath arch/x86/entry/common.c:265 [inline] do_syscall_32_irqs_on arch/x86/entry/common.c:336 [inline] do_fast_syscall_32+0xbe6/0xf9f arch/x86/entry/common.c:392 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 other info that might help us debug this: Chain exists of: (console_sem).lock --> &rq->lock --> &obj_hash[i].lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&obj_hash[i].lock); lock(&rq->lock); lock(&obj_hash[i].lock); lock((console_sem).lock); *** DEADLOCK *** 2 locks held by syz-executor1/16145: #0: (&obj_hash[i].lock){-.-.}, at: [<0000000060781ed8>] __debug_check_no_obj_freed lib/debugobjects.c:736 [inline] #0: (&obj_hash[i].lock){-.-.}, at: [<0000000060781ed8>] debug_check_no_obj_freed+0x1e9/0xf1f lib/debugobjects.c:774 #1: (rcu_read_lock){....}, at: [<00000000b0351306>] rcu_read_unlock include/linux/rcupdate.h:682 [inline] #1: (rcu_read_lock){....}, at: [<00000000b0351306>] atomic_notifier_call_chain+0x0/0x140 kernel/notifier.c:184 stack backtrace: CPU: 1 PID: 16145 Comm: syz-executor1 Not tainted 4.16.0-rc7+ #278 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/0x24d lib/dump_stack.c:53 print_circular_bug.isra.38+0x2cd/0x2dc kernel/locking/lockdep.c:1223 check_prev_add kernel/locking/lockdep.c:1863 [inline] check_prevs_add kernel/locking/lockdep.c:1976 [inline] validate_chain kernel/locking/lockdep.c:2417 [inline] __lock_acquire+0x30a8/0x3e00 kernel/locking/lockdep.c:3431 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x96/0xc0 kernel/locking/spinlock.c:152 down_trylock+0x13/0x70 kernel/locking/semaphore.c:136 __down_trylock_console_sem+0xa2/0x1e0 kernel/printk/printk.c:225 console_trylock+0x15/0x70 kernel/printk/printk.c:2229 console_trylock_spinning kernel/printk/printk.c:1643 [inline] vprintk_emit+0x5b5/0xb90 kernel/printk/printk.c:1906 vprintk_default+0x28/0x30 kernel/printk/printk.c:1947 vprintk_func+0x57/0xc0 kernel/printk/printk_safe.c:379 printk+0xaa/0xca kernel/printk/printk.c:1980 kasan_die_handler+0x31/0x3f arch/x86/mm/kasan_init_64.c:247 notifier_call_chain+0x136/0x2c0 kernel/notifier.c:93 __atomic_notifier_call_chain kernel/notifier.c:183 [inline] atomic_notifier_call_chain+0x77/0x140 kernel/notifier.c:193 notify_die+0x18c/0x280 kernel/notifier.c:549 do_general_protection+0x331/0x3e0 arch/x86/kernel/traps.c:558 general_protection+0x25/0x50 arch/x86/entry/entry_64.S:1150 RIP: 0010:__debug_check_no_obj_freed lib/debugobjects.c:737 [inline] RIP: 0010:debug_check_no_obj_freed+0x239/0xf1f lib/debugobjects.c:774 RSP: 0018:ffff8801d0a1dac0 EFLAGS: 00010807 RAX: 0000000000000004 RBX: 90316c5f90316c5f RCX: 0000000000000282 RDX: 12062d8bf2062d8b RSI: 1ffff1003746da42 RDI: ffff8801ba36d210 RBP: ffff8801d0a1dc90 R08: 1ffff1003a143a95 R09: ffff88019d800000 R10: ffffed003a143b7d R11: ffff88019da00000 R12: ffffed003a143b6d R13: ffff8801d0a1dc68 R14: 90316c5f90316c5f R15: dffffc0000000000 free_pages_prepare mm/page_alloc.c:1069 [inline] __free_pages_ok+0x765/0x31e0 mm/page_alloc.c:1264 free_compound_page+0x5c/0x70 mm/page_alloc.c:605 free_transhuge_page+0x2d2/0x430 mm/huge_memory.c:2733 __put_compound_page+0x88/0xc0 mm/swap.c:95 release_pages+0x64b/0x1230 mm/swap.c:760 ? f Lost 113 message(s)! ---[ end trace 8bde01574d569c59 ]--- general protection fault: 0000 [#2] SMP KASAN Dumping ftrace buffer: