bisecting fixing commit since d18b78abc0c6e7d3119367c931c583e02d466495 building syzkaller on cef5ae6814696260ff58c538a1b6044af90c5979 testing commit d18b78abc0c6e7d3119367c931c583e02d466495 with gcc (GCC) 8.1.0 kernel signature: 602462176490364b42b24748f6fb00e204609017344e3578bb9af3347da04939 all runs: crashed: KASAN: use-after-free Read in __nf_tables_abort testing current HEAD 13d2ce42de8cb98ff952f8de6307f896203854c2 testing commit 13d2ce42de8cb98ff952f8de6307f896203854c2 with gcc (GCC) 8.1.0 kernel signature: 459c69d95963179e668409c1298231934da9831fa983ebd67d08bd834b574367 all runs: crashed: KASAN: use-after-free Read in __nf_tables_abort revisions tested: 2, total time: 24m16.241214982s (build: 18m3.37908162s, test: 5m24.170496381s) the crash still happens on HEAD commit msg: Linux 4.19.163 crash: KASAN: use-after-free Read in __nf_tables_abort IPv6: ADDRCONF(NETDEV_UP): batadv_slave_1: link is not ready batman_adv: batadv0: Interface activated: batadv_slave_1 IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready ================================================================== BUG: KASAN: use-after-free in __list_del_entry_valid+0xd0/0xf3 lib/list_debug.c:42 Read of size 8 at addr ffff8881ded64508 by task syz-executor.3/7290 CPU: 0 PID: 7290 Comm: syz-executor.3 Not tainted 4.19.163-syzkaller #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+0x17c/0x22a lib/dump_stack.c:118 print_address_description.cold.6+0x9/0x211 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x307 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 __list_del_entry_valid+0xd0/0xf3 lib/list_debug.c:42 __list_del_entry include/linux/list.h:117 [inline] list_del_rcu include/linux/rculist.h:130 [inline] __nf_tables_abort+0x1556/0x1eb0 net/netfilter/nf_tables_api.c:6660 nf_tables_abort+0xf/0x30 net/netfilter/nf_tables_api.c:6770 nfnetlink_rcv_batch+0x4e3/0x1520 net/netfilter/nfnetlink.c:496 nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:545 [inline] nfnetlink_rcv+0x2f1/0x3b0 net/netfilter/nfnetlink.c:563 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x443/0x660 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x666/0xc50 net/netlink/af_netlink.c:1909 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:632 ___sys_sendmsg+0x647/0x950 net/socket.c:2115 __sys_sendmsg+0xd9/0x180 net/socket.c:2153 __do_sys_sendmsg net/socket.c:2162 [inline] __se_sys_sendmsg net/socket.c:2160 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2160 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45d579 Code: 5d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 2b b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f9d063b5c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000002a4c0 RCX: 000000000045d579 RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000003 RBP: 000000000118cf80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cf4c R13: 00007ffda61c2aaf R14: 00007f9d063b69c0 R15: 000000000118cf4c Allocated by task 7290: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:553 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:538 kmem_cache_alloc_trace+0x152/0x3a0 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] nf_tables_newtable+0x617/0x1400 net/netfilter/nf_tables_api.c:883 nfnetlink_rcv_batch+0x8cd/0x1520 net/netfilter/nfnetlink.c:435 nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:545 [inline] nfnetlink_rcv+0x2f1/0x3b0 net/netfilter/nfnetlink.c:563 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x443/0x660 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x666/0xc50 net/netlink/af_netlink.c:1909 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:632 ___sys_sendmsg+0x647/0x950 net/socket.c:2115 __sys_sendmsg+0xd9/0x180 net/socket.c:2153 __do_sys_sendmsg net/socket.c:2162 [inline] __se_sys_sendmsg net/socket.c:2160 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2160 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 7308: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x13c/0x220 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3503 [inline] kfree+0xcf/0x220 mm/slab.c:3822 nf_tables_table_destroy.isra.9+0xd4/0x110 net/netfilter/nf_tables_api.c:1062 nft_commit_release net/netfilter/nf_tables_api.c:6277 [inline] nf_tables_commit_release net/netfilter/nf_tables_api.c:6317 [inline] nf_tables_commit+0x12b6/0x4df0 net/netfilter/nf_tables_api.c:6607 nfnetlink_rcv_batch+0xb75/0x1520 net/netfilter/nfnetlink.c:487 nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:545 [inline] nfnetlink_rcv+0x2f1/0x3b0 net/netfilter/nfnetlink.c:563 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x443/0x660 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x666/0xc50 net/netlink/af_netlink.c:1909 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:632 ___sys_sendmsg+0x647/0x950 net/socket.c:2115 __sys_sendmsg+0xd9/0x180 net/socket.c:2153 __do_sys_sendmsg net/socket.c:2162 [inline] __se_sys_sendmsg net/socket.c:2160 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2160 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8881ded64500 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 8 bytes inside of 512-byte region [ffff8881ded64500, ffff8881ded64700) The buggy address belongs to the page: page:ffffea00077b5900 count:1 mapcount:0 mapping:ffff8881f6400940 index:0x0 flags: 0x17ffe0000000100(slab) raw: 017ffe0000000100 ffffea000756adc8 ffffea0007623408 ffff8881f6400940 raw: 0000000000000000 ffff8881ded64000 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881ded64400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881ded64480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881ded64500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881ded64580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881ded64600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Bluetooth: hci3: command 0x0419 tx timeout Bluetooth: hci1: command 0x0419 tx timeout Bluetooth: hci2: command 0x0419 tx timeout Bluetooth: hci5: command 0x0419 tx timeout Bluetooth: hci4: command 0x0419 tx timeout list_del corruption, ffff8881d9a67d40->prev is LIST_POISON2 (dead000000000200) Bluetooth: hci0: command 0x0419 tx timeout list_del corruption, ffff8881d9a675c0->prev is LIST_POISON2 (dead000000000200)