bisecting fixing commit since 7f2c5eb458b8855655a19c44cd0043f7f83c595f building syzkaller on 96dd36234d97bbf6b403f3a7f03cfc0296422879 testing commit 7f2c5eb458b8855655a19c44cd0043f7f83c595f with gcc (GCC) 8.1.0 kernel signature: bb47790e98351d719c66448be1bc928ef645568dc1f3145c0c63dc8aabf22dd4 run #0: crashed: KASAN: use-after-free Read in __smc_diag_dump run #1: crashed: general protection fault in __smc_diag_dump run #2: crashed: KASAN: use-after-free Read in __smc_diag_dump run #3: crashed: general protection fault in __smc_diag_dump run #4: crashed: general protection fault in __smc_diag_dump run #5: crashed: general protection fault in __smc_diag_dump run #6: crashed: KASAN: use-after-free Read in __smc_diag_dump run #7: crashed: general protection fault in __smc_diag_dump run #8: crashed: general protection fault in __smc_diag_dump run #9: crashed: general protection fault in __smc_diag_dump testing current HEAD 27ce4f2a6817e38ca74c643d47a96359f6cc0c1c testing commit 27ce4f2a6817e38ca74c643d47a96359f6cc0c1c with gcc (GCC) 8.1.0 kernel signature: 9153132e4933d2c5ea0af6c3070ee8d6a2be35540dce9336b695ef3cc8a7cb31 run #0: crashed: general protection fault in __smc_diag_dump run #1: crashed: general protection fault in __smc_diag_dump run #2: crashed: general protection fault in __smc_diag_dump run #3: crashed: general protection fault in __smc_diag_dump run #4: crashed: general protection fault in __smc_diag_dump run #5: crashed: general protection fault in __smc_diag_dump run #6: crashed: general protection fault in __smc_diag_dump run #7: crashed: KASAN: use-after-free Read in __smc_diag_dump run #8: crashed: KASAN: use-after-free Read in __smc_diag_dump run #9: crashed: KASAN: use-after-free Read in __smc_diag_dump revisions tested: 2, total time: 23m22.647367903s (build: 16m58.753190129s, test: 5m40.509911059s) the crash still happens on HEAD commit msg: Linux 4.14.206 crash: KASAN: use-after-free Read in __smc_diag_dump IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready Bluetooth: hci0 command 0x0409 tx timeout Bluetooth: hci1 command 0x0409 tx timeout ================================================================== BUG: KASAN: use-after-free in smc_diag_msg_common_fill net/smc/smc_diag.c:46 [inline] BUG: KASAN: use-after-free in __smc_diag_dump.isra.1+0x13c4/0x1620 net/smc/smc_diag.c:81 Read of size 8 at addr ffff888089b84660 by task syz-executor.0/8283 CPU: 0 PID: 8283 Comm: syz-executor.0 Not tainted 4.14.206-syzkaller #0 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+0x14b/0x1f1 lib/dump_stack.c:58 print_address_description.cold.6+0x9/0x1ca mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.7+0x11a/0x2d4 mm/kasan/report.c:409 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 smc_diag_msg_common_fill net/smc/smc_diag.c:46 [inline] __smc_diag_dump.isra.1+0x13c4/0x1620 net/smc/smc_diag.c:81 smc_diag_dump+0x1dc/0x2a0 net/smc/smc_diag.c:169 netlink_dump+0x373/0x9b0 net/netlink/af_netlink.c:2203 __netlink_dump_start+0x4cc/0x770 net/netlink/af_netlink.c:2300 netlink_dump_start include/linux/netlink.h:217 [inline] smc_diag_handler_dump+0x197/0x220 net/smc/smc_diag.c:190 __sock_diag_cmd net/core/sock_diag.c:231 [inline] sock_diag_rcv_msg+0x252/0x350 net/core/sock_diag.c:263 netlink_rcv_skb+0x12f/0x3b0 net/netlink/af_netlink.c:2433 sock_diag_rcv+0x25/0x40 net/core/sock_diag.c:274 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x40b/0x610 net/netlink/af_netlink.c:1313 netlink_sendmsg+0x657/0xc60 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:656 ___sys_sendmsg+0x625/0x920 net/socket.c:2062 __sys_sendmsg+0xc1/0x140 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0xd/0x20 net/socket.c:2103 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45cc79 RSP: 002b:00007fd792a19c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000002bec0 RCX: 000000000045cc79 RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000005 RBP: 000000000078bf40 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000078bf0c R13: 00007ffecf776e5f R14: 00007fd792a1a9c0 R15: 000000000078bf0c Allocated by task 8283: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:551 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:536 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc+0x12e/0x3e0 mm/slab.c:3552 sock_alloc_inode+0x18/0x230 net/socket.c:251 alloc_inode+0x56/0x150 fs/inode.c:210 new_inode_pseudo+0xc/0xd0 fs/inode.c:899 sock_alloc+0x3c/0x280 net/socket.c:569 __sock_create+0x7a/0x540 net/socket.c:1239 sock_create_kern+0xf/0x20 net/socket.c:1321 smc_create+0xe1/0x310 net/smc/af_smc.c:1361 __sock_create+0x262/0x540 net/socket.c:1275 sock_create net/socket.c:1315 [inline] SYSC_socket net/socket.c:1345 [inline] SyS_socket+0xd5/0x1e0 net/socket.c:1325 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 8279: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xab/0x190 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kmem_cache_free+0x80/0x2d0 mm/slab.c:3758 sock_destroy_inode+0x50/0x60 net/socket.c:281 destroy_inode+0xb3/0x100 fs/inode.c:267 evict+0x36f/0x590 fs/inode.c:572 iput_final fs/inode.c:1524 [inline] iput+0x3ac/0x810 fs/inode.c:1551 __sock_release+0x211/0x2a0 net/socket.c:615 sock_release+0xb/0x10 net/socket.c:623 smc_release+0x1c3/0x570 net/smc/af_smc.c:141 __sock_release+0xc2/0x2a0 net/socket.c:602 sock_close+0x10/0x20 net/socket.c:1139 __fput+0x232/0x740 fs/file_table.c:210 ____fput+0x9/0x10 fs/file_table.c:244 task_work_run+0xe5/0x170 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x14a/0x190 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x416/0x5b0 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff888089b84640 which belongs to the cache sock_inode_cache of size 1000 The buggy address is located 32 bytes inside of 1000-byte region [ffff888089b84640, ffff888089b84a28) The buggy address belongs to the page: page:ffffea000226e100 count:1 mapcount:0 mapping:ffff888089b841c0 index:0xffff888089b84ffd flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff888089b841c0 ffff888089b84ffd 0000000100000003 raw: ffffea000226e0e0 ffffea000226dea0 ffff8880b59f6900 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888089b84500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888089b84580: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc >ffff888089b84600: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff888089b84680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888089b84700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================