================================================================== BUG: KASAN: slab-out-of-bounds in hlist_move_list include/linux/list.h:843 [inline] BUG: KASAN: slab-out-of-bounds in __collect_expired_timers kernel/time/timer.c:1482 [inline] BUG: KASAN: slab-out-of-bounds in collect_expired_timers kernel/time/timer.c:1717 [inline] BUG: KASAN: slab-out-of-bounds in __run_timers+0x507/0x740 kernel/time/timer.c:1781 Write of size 8 at addr ffff8881e1cf31c8 by task syz-executor.5/19507 CPU: 1 PID: 19507 Comm: syz-executor.5 Not tainted 5.4.123-syzkaller-00835-g3e256ddba1ff #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+0x1d8/0x24e lib/dump_stack.c:118 print_address_description+0x9b/0x650 mm/kasan/report.c:384 __kasan_report+0x182/0x260 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:641 hlist_move_list include/linux/list.h:843 [inline] __collect_expired_timers kernel/time/timer.c:1482 [inline] collect_expired_timers kernel/time/timer.c:1717 [inline] __run_timers+0x507/0x740 kernel/time/timer.c:1781 run_timer_softirq+0x46/0x80 kernel/time/timer.c:1798 __do_softirq+0x23e/0x615 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x195/0x1c0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:537 [inline] smp_apic_timer_interrupt+0x113/0x420 arch/x86/kernel/apic/apic.c:1150 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:831 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0x4d/0x80 kernel/locking/spinlock.c:191 Code: 74 0c 48 c7 c7 70 d1 ea 85 e8 7f a5 4d fd 48 83 3d a7 73 a4 01 00 74 36 48 89 df e8 fd d7 06 fd 66 90 4c 89 34 24 ff 34 24 9d 01 00 00 00 e8 49 2d 00 fd 65 8b 05 9e 8f bb 7b 85 c0 74 08 48 RSP: 0018:ffff8881db46f720 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000001 RBX: ffff8881de7163e4 RCX: dffffc0000000000 RDX: ffffc900018e7000 RSI: 0000000000000246 RDI: ffff8881de7163e4 RBP: ffff8881db46f830 R08: ffffffff82279c9d R09: 0000000000000003 R10: ffffed103b68dec5 R11: 0000000000000004 R12: ffff8881db46f920 R13: ffff8881de7163e4 R14: 0000000000000246 R15: ffff8881a7554280 spin_unlock_irqrestore include/linux/spinlock.h:393 [inline] __skb_try_recv_datagram+0x1c2/0x5b0 net/core/datagram.c:272 unix_dgram_recvmsg+0x2cb/0x1080 net/unix/af_unix.c:2070 ____sys_recvmsg+0x1d1/0x440 net/socket.c:2530 ___sys_recvmsg net/socket.c:2571 [inline] do_recvmmsg+0x568/0xb40 net/socket.c:2682 __sys_recvmmsg net/socket.c:2761 [inline] __do_sys_recvmmsg net/socket.c:2784 [inline] __se_sys_recvmmsg net/socket.c:2777 [inline] __x64_sys_recvmmsg+0x195/0x240 net/socket.c:2777 do_syscall_64+0xcb/0x1e0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x4665d9 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:00007f70d0e58188 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 000000000056c038 RCX: 00000000004665d9 RDX: 0000000000010106 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000246 R12: 000000000056c038 R13: 00007ffc89434edf R14: 00007f70d0e58300 R15: 0000000000022000 Allocated by task 0: (stack is not available) Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff8881e1cf3180 which belongs to the cache sgpool-32 of size 1024 The buggy address is located 72 bytes inside of 1024-byte region [ffff8881e1cf3180, ffff8881e1cf3580) The buggy address belongs to the page: page:ffffea0007873c00 refcount:1 mapcount:0 mapping:ffff8881f09b5900 index:0x0 compound_mapcount: 0 flags: 0x8000000000010200(slab|head) raw: 8000000000010200 dead000000000100 dead000000000122 ffff8881f09b5900 raw: 0000000000000000 00000000800e000e 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:2165 [inline] prep_new_page+0x19a/0x380 mm/page_alloc.c:2171 get_page_from_freelist+0x550/0x8b0 mm/page_alloc.c:3794 __alloc_pages_nodemask+0x3a2/0x880 mm/page_alloc.c:4855 alloc_slab_page+0x39/0x3e0 mm/slub.c:342 allocate_slab mm/slub.c:1675 [inline] new_slab+0x97/0x460 mm/slub.c:1741 new_slab_objects mm/slub.c:2498 [inline] ___slab_alloc+0x330/0x4c0 mm/slub.c:2659 __slab_alloc mm/slub.c:2699 [inline] slab_alloc_node mm/slub.c:2784 [inline] slab_alloc mm/slub.c:2829 [inline] kmem_cache_alloc+0x18b/0x290 mm/slub.c:2834 mempool_alloc_slab+0x16/0x20 mm/mempool.c:513 mempool_alloc+0x113/0x680 mm/mempool.c:393 __sg_alloc_table+0xca/0x3a0 lib/scatterlist.c:302 sg_alloc_table_chained+0xe0/0x1d0 lib/sg_pool.c:132 scsi_init_sgtable drivers/scsi/scsi_lib.c:998 [inline] scsi_init_io+0xff/0x340 drivers/scsi/scsi_lib.c:1033 sd_setup_read_write_cmnd drivers/scsi/sd.c:1176 [inline] sd_init_command+0xb53/0x2aa0 drivers/scsi/sd.c:1292 scsi_setup_fs_cmnd drivers/scsi/scsi_lib.c:1215 [inline] scsi_setup_cmnd drivers/scsi/scsi_lib.c:1234 [inline] scsi_mq_prep_fn drivers/scsi/scsi_lib.c:1615 [inline] scsi_queue_rq+0x1780/0x2720 drivers/scsi/scsi_lib.c:1683 blk_mq_dispatch_rq_list+0x90c/0x17e0 block/blk-mq.c:1297 blk_mq_do_dispatch_sched+0x313/0x3f0 block/blk-mq-sched.c:124 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1176 [inline] __free_pages_ok+0xc60/0xd80 mm/page_alloc.c:1438 free_the_page mm/page_alloc.c:4917 [inline] __free_pages+0x8f/0x250 mm/page_alloc.c:4923 kfree+0x1ee/0x660 mm/slub.c:4058 device_release+0x70/0x1a0 drivers/base/core.c:1767 kobject_cleanup+0x1de/0x3c0 lib/kobject.c:708 netdev_run_todo+0xc0b/0xda0 net/core/dev.c:9420 tun_detach drivers/net/tun.c:751 [inline] tun_chr_close+0xc0/0xd0 drivers/net/tun.c:3517 __fput+0x27d/0x6c0 fs/file_table.c:281 task_work_run+0x186/0x1b0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop arch/x86/entry/common.c:163 [inline] prepare_exit_to_usermode+0x2b0/0x310 arch/x86/entry/common.c:194 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Memory state around the buggy address: ffff8881e1cf3080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881e1cf3100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881e1cf3180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8881e1cf3200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881e1cf3280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor instruction fetch in kernel mode #PF: error_code(0x0010) - not-present page PGD 1e8449067 P4D 1e8449067 PUD 19a825067 PMD 0 Oops: 0010 [#1] PREEMPT SMP KASAN CPU: 1 PID: 19507 Comm: syz-executor.5 Tainted: G B 5.4.123-syzkaller-00835-g3e256ddba1ff #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:0x0 Code: Bad RIP value. RSP: 0018:ffff8881f6f09cd0 EFLAGS: 00010202 RAX: ffffffff81561868 RBX: 0000000000000101 RCX: ffff8881af1f2f40 RDX: 0000000080000101 RSI: 0000000000000000 RDI: ffff8881e1cf31c0 RBP: ffff8881e1cf31e0 R08: ffffffff8156162d R09: fffffbfff0dc3fd1 R10: fffffbfff0dc3fd1 R11: 0000000000000000 R12: 00000001000031a0 R13: 1ffff1103ede46f1 R14: 0000000000000000 R15: ffff8881e1cf31c0 FS: 00007f70d0e58700(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 000000019cf70000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: call_timer_fn+0x30/0x330 kernel/time/timer.c:1416 expire_timers+0x214/0x410 kernel/time/timer.c:1461 __run_timers+0x603/0x740 kernel/time/timer.c:1785 run_timer_softirq+0x46/0x80 kernel/time/timer.c:1798 __do_softirq+0x23e/0x615 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x195/0x1c0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:537 [inline] smp_apic_timer_interrupt+0x113/0x420 arch/x86/kernel/apic/apic.c:1150 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:831 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0x4d/0x80 kernel/locking/spinlock.c:191 Code: 74 0c 48 c7 c7 70 d1 ea 85 e8 7f a5 4d fd 48 83 3d a7 73 a4 01 00 74 36 48 89 df e8 fd d7 06 fd 66 90 4c 89 34 24 ff 34 24 9d 01 00 00 00 e8 49 2d 00 fd 65 8b 05 9e 8f bb 7b 85 c0 74 08 48 RSP: 0018:ffff8881db46f720 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000001 RBX: ffff8881de7163e4 RCX: dffffc0000000000 RDX: ffffc900018e7000 RSI: 0000000000000246 RDI: ffff8881de7163e4 RBP: ffff8881db46f830 R08: ffffffff82279c9d R09: 0000000000000003 R10: ffffed103b68dec5 R11: 0000000000000004 R12: ffff8881db46f920 R13: ffff8881de7163e4 R14: 0000000000000246 R15: ffff8881a7554280 spin_unlock_irqrestore include/linux/spinlock.h:393 [inline] __skb_try_recv_datagram+0x1c2/0x5b0 net/core/datagram.c:272 unix_dgram_recvmsg+0x2cb/0x1080 net/unix/af_unix.c:2070 ____sys_recvmsg+0x1d1/0x440 net/socket.c:2530 ___sys_recvmsg net/socket.c:2571 [inline] do_recvmmsg+0x568/0xb40 net/socket.c:2682 __sys_recvmmsg net/socket.c:2761 [inline] __do_sys_recvmmsg net/socket.c:2784 [inline] __se_sys_recvmmsg net/socket.c:2777 [inline] __x64_sys_recvmmsg+0x195/0x240 net/socket.c:2777 do_syscall_64+0xcb/0x1e0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x4665d9 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:00007f70d0e58188 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 000000000056c038 RCX: 00000000004665d9 RDX: 0000000000010106 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000246 R12: 000000000056c038 R13: 00007ffc89434edf R14: 00007f70d0e58300 R15: 0000000000022000 Modules linked in: CR2: 0000000000000000 ---[ end trace 20739b78d5b0e69e ]--- RIP: 0010:0x0 Code: Bad RIP value. RSP: 0018:ffff8881f6f09cd0 EFLAGS: 00010202 RAX: ffffffff81561868 RBX: 0000000000000101 RCX: ffff8881af1f2f40 RDX: 0000000080000101 RSI: 0000000000000000 RDI: ffff8881e1cf31c0 RBP: ffff8881e1cf31e0 R08: ffffffff8156162d R09: fffffbfff0dc3fd1 R10: fffffbfff0dc3fd1 R11: 0000000000000000 R12: 00000001000031a0 R13: 1ffff1103ede46f1 R14: 0000000000000000 R15: ffff8881e1cf31c0 FS: 00007f70d0e58700(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 000000019cf70000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400