bisecting fixing commit since dcb8cfbd8fe9e62c7d64e82288d3ffe2502b7371 building syzkaller on 6affd8e838ce8a0c7d72445a7f67fe3bde8bbe04 testing commit dcb8cfbd8fe9e62c7d64e82288d3ffe2502b7371 with gcc (GCC) 8.1.0 all runs: crashed: KASAN: use-after-free Read in sock_def_write_space testing current HEAD 72d5ac679e246c15d94a00d53a6289e142cfcf86 testing commit 72d5ac679e246c15d94a00d53a6289e142cfcf86 with gcc (GCC) 8.1.0 run #0: crashed: KASAN: use-after-free Read in sock_def_write_space run #1: crashed: KASAN: use-after-free Read in sock_def_write_space run #2: crashed: KASAN: use-after-free Read in sock_def_write_space run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK revisions tested: 2, total time: 30m55.070094571s (build: 12m31.491915398s, test: 17m1.989177066s) the crash still happens on HEAD commit msg: Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi crash: KASAN: use-after-free Read in sock_def_write_space ================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:199 [inline] BUG: KASAN: use-after-free in list_empty include/linux/list.h:268 [inline] BUG: KASAN: use-after-free in waitqueue_active include/linux/wait.h:126 [inline] BUG: KASAN: use-after-free in wq_has_sleeper include/linux/wait.h:160 [inline] BUG: KASAN: use-after-free in skwq_has_sleeper include/net/sock.h:2093 [inline] BUG: KASAN: use-after-free in sock_def_write_space+0x488/0x4b0 net/core/sock.c:2815 Read of size 8 at addr ffff8880928b9578 by task syz-executor.4/7900 CPU: 1 PID: 7900 Comm: syz-executor.4 Not tainted 5.4.0-rc7+ #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+0x12d/0x187 lib/dump_stack.c:118 print_address_description.constprop.8.cold.10+0x9/0x31d mm/kasan/report.c:374 __kasan_report.cold.11+0x1b/0x3a mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:634 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 __read_once_size include/linux/compiler.h:199 [inline] list_empty include/linux/list.h:268 [inline] waitqueue_active include/linux/wait.h:126 [inline] wq_has_sleeper include/linux/wait.h:160 [inline] skwq_has_sleeper include/net/sock.h:2093 [inline] sock_def_write_space+0x488/0x4b0 net/core/sock.c:2815 sock_wfree+0x100/0x130 net/core/sock.c:1960 skb_release_head_state+0x9f/0x1a0 net/core/skbuff.c:652 skb_release_all+0xd/0x50 net/core/skbuff.c:663 _kfree_skb_defer net/core/skbuff.c:873 [inline] napi_consume_skb+0x129/0x430 net/core/skbuff.c:918 free_old_xmit_skbs+0xbc/0x1f0 drivers/net/virtio_net.c:1366 virtnet_poll_tx+0x1e5/0x360 drivers/net/virtio_net.c:1493 napi_poll net/core/dev.c:6311 [inline] net_rx_action+0x458/0xe40 net/core/dev.c:6379 __do_softirq+0x262/0x9a8 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x19a/0x1d0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] do_IRQ+0xe3/0x280 arch/x86/kernel/irq.c:263 common_interrupt+0xf/0xf arch/x86/entry/entry_64.S:607 RIP: 0010:__read_once_size include/linux/compiler.h:199 [inline] RIP: 0010:list_empty include/linux/list.h:268 [inline] RIP: 0010:inode_has_buffers fs/buffer.c:461 [inline] RIP: 0010:invalidate_inode_buffers+0x0/0x120 fs/buffer.c:763 Code: ff 4c 89 f7 e8 b1 7b ea ff e9 24 ff ff ff 4c 89 ef e8 04 7b ea ff e9 d5 fe ff ff 0f 1f 44 00 00 66 2e 0f 1f 84 00 00 00 00 00 <48> b8 00 00 00 00 00 fc ff df 55 48 89 e5 41 56 41 55 4c 8d af 60 RSP: 0018:ffff8880a04b7a90 EFLAGS: 00000292 ORIG_RAX: ffffffffffffffd9 RAX: 000000000000a1ff RBX: ffff88807ccea588 RCX: 1ffff1100f99d568 RDX: 1ffff1100f99d4b1 RSI: 0000000000000000 RDI: ffff88807ccea588 RBP: ffff8880a04b7ab8 R08: ffffed1015d66b75 R09: ffffed1015d66b75 R10: ffffed1015d66b74 R11: ffff8880aeb35ba3 R12: ffff88807ccea938 R13: ffff88807ccea770 R14: 0000000000000001 R15: ffff88807ccea588 ext4_free_inode+0x214/0x1130 fs/ext4/ialloc.c:279 ext4_evict_inode+0x776/0x1220 fs/ext4/inode.c:333 evict+0x29c/0x590 fs/inode.c:574 iput_final fs/inode.c:1563 [inline] iput+0x3b1/0x6c0 fs/inode.c:1589 do_unlinkat+0x47c/0x670 fs/namei.c:4061 __do_sys_unlink fs/namei.c:4102 [inline] __se_sys_unlink fs/namei.c:4100 [inline] __x64_sys_unlink+0x3d/0x50 fs/namei.c:4100 do_syscall_64+0xca/0x5d0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459577 Code: 00 66 90 b8 58 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 9d ba fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 57 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 7d ba fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffe879b04d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000459577 RDX: 00007ffe879b04f0 RSI: 00007ffe879b04f0 RDI: 00007ffe879b0580 RBP: 000000000000111a R08: 0000000000000000 R09: 0000000000000011 R10: 000000000000000a R11: 0000000000000246 R12: 00007ffe879b1610 R13: 0000000002313940 R14: 0000000000000000 R15: 00007ffe879b1610 Allocated by task 9522: save_stack+0x21/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc.constprop.9+0xc7/0xd0 mm/kasan/common.c:510 kasan_slab_alloc+0x12/0x20 mm/kasan/common.c:518 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc mm/slab.c:3319 [inline] kmem_cache_alloc+0x121/0x750 mm/slab.c:3483 sock_alloc_inode+0x16/0x1a0 net/socket.c:239 alloc_inode+0x5c/0x1a0 fs/inode.c:230 new_inode_pseudo+0xc/0xd0 fs/inode.c:919 sock_alloc+0x3c/0x270 net/socket.c:558 __sock_create+0x7a/0x540 net/socket.c:1382 sock_create net/socket.c:1469 [inline] __sys_socket+0xd7/0x1c0 net/socket.c:1511 __do_sys_socket net/socket.c:1520 [inline] __se_sys_socket net/socket.c:1518 [inline] __x64_sys_socket+0x6e/0xb0 net/socket.c:1518 do_syscall_64+0xca/0x5d0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 3890: save_stack+0x21/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] kasan_set_free_info mm/kasan/common.c:332 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:471 kasan_slab_free+0xe/0x10 mm/kasan/common.c:480 __cache_free mm/slab.c:3425 [inline] kmem_cache_free+0x83/0x320 mm/slab.c:3693 sock_free_inode+0x17/0x20 net/socket.c:260 i_callback+0x3c/0x70 fs/inode.c:219 __rcu_reclaim kernel/rcu/rcu.h:222 [inline] rcu_do_batch kernel/rcu/tree.c:2157 [inline] rcu_core+0x557/0x14b0 kernel/rcu/tree.c:2377 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2386 __do_softirq+0x262/0x9a8 kernel/softirq.c:292 The buggy address belongs to the object at ffff8880928b9500 which belongs to the cache sock_inode_cache(55:syz5) of size 1152 The buggy address is located 120 bytes inside of 1152-byte region [ffff8880928b9500, ffff8880928b9980) The buggy address belongs to the page: page:ffffea00024a2e40 refcount:1 mapcount:0 mapping:ffff88809a092700 index:0xffff8880928b9ffd flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00024adc88 ffffea000247ea48 ffff88809a092700 raw: ffff8880928b9ffd ffff8880928b9000 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880928b9400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880928b9480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880928b9500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880928b9580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880928b9600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================