bisecting fixing commit since 4938296e03bd227e5020d63d418956fe52baf97c building syzkaller on 4d1b57d4d1aa7f8938163f8debd9293c062482b0 testing commit 4938296e03bd227e5020d63d418956fe52baf97c compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: d6851c695955a52bd04fc3c17d2b3b423b9dc4fe9161c61b8a1cd159308c86de run #0: crashed: KASAN: use-after-free Read in ip_check_mc_rcu run #1: crashed: KASAN: use-after-free Read in ip_check_mc_rcu run #2: crashed: KASAN: use-after-free Read in ip_check_mc_rcu run #3: crashed: KASAN: use-after-free Read in ip_check_mc_rcu run #4: crashed: KASAN: use-after-free Read in ip_check_mc_rcu run #5: crashed: KASAN: use-after-free Read in ip_check_mc_rcu run #6: crashed: KASAN: use-after-free Read in ip_check_mc_rcu run #7: crashed: KASAN: use-after-free Read in ip_check_mc_rcu run #8: crashed: KASAN: use-after-free Read in ip_check_mc_rcu run #9: crashed: KASAN: use-after-free Read in ip_check_mc_rcu run #10: crashed: KASAN: use-after-free Read in ip_check_mc_rcu run #11: crashed: KASAN: use-after-free Read in ip_check_mc_rcu run #12: crashed: KASAN: use-after-free Read in ip_check_mc_rcu run #13: OK run #14: OK run #15: OK run #16: OK run #17: OK run #18: OK run #19: OK testing current HEAD 59456c9cc40c8f75b5a7efa0fe1f211d9c6fcaf1 testing commit 59456c9cc40c8f75b5a7efa0fe1f211d9c6fcaf1 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 91ac312f2c39afc869d277b94da8fee838a7ab4cb490de49edf252419f240bc1 run #0: crashed: KASAN: use-after-free Read in ip_check_mc_rcu run #1: crashed: KASAN: use-after-free Read in ip_check_mc_rcu run #2: crashed: KASAN: use-after-free Read in ip_check_mc_rcu run #3: crashed: KASAN: use-after-free Read in ip_check_mc_rcu run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK reproducer seems to be flaky Reproducer flagged being flaky revisions tested: 2, total time: 35m38.101404777s (build: 17m16.265111208s, test: 17m58.826747306s) the crash still happens on HEAD commit msg: Linux 4.19.204 crash: KASAN: use-after-free Read in ip_check_mc_rcu ieee802154 phy1 wpan1: encryption failed: -22 ================================================================== BUG: KASAN: use-after-free in ip_check_mc_rcu+0x4d4/0x530 net/ipv4/igmp.c:2739 Read of size 8 at addr ffff8880aab33d00 by task syz-executor.1/16915 CPU: 0 PID: 16915 Comm: syz-executor.1 Not tainted 4.19.204-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/0x226 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 mm/kasan/report.c:412 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:396 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 ip_check_mc_rcu+0x4d4/0x530 net/ipv4/igmp.c:2739 __mkroute_output net/ipv4/route.c:2275 [inline] ip_route_output_key_hash_rcu+0x1e85/0x2ab0 net/ipv4/route.c:2555 ip_route_output_key_hash+0x18f/0x2a0 net/ipv4/route.c:2383 __ip_route_output_key include/net/route.h:124 [inline] ip_route_output_flow+0x1f/0x140 net/ipv4/route.c:2640 udp_sendmsg+0x141f/0x2120 net/ipv4/udp.c:1101 inet_sendmsg+0x108/0x440 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:661 ___sys_sendmsg+0x28e/0x950 net/socket.c:2225 __sys_sendmmsg+0x160/0x370 net/socket.c:2320 __do_sys_sendmmsg net/socket.c:2349 [inline] __se_sys_sendmmsg net/socket.c:2346 [inline] __x64_sys_sendmmsg+0x98/0x100 net/socket.c:2346 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4665e9 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:00007fe3c9c05188 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9 RDX: 000000000800001d RSI: 0000000020007fc0 RDI: 0000000000000004 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffea4326def R14: 00007fe3c9c05300 R15: 0000000000022000 Allocated by task 16915: 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] ip_mc_add1_src net/ipv4/igmp.c:1987 [inline] ip_mc_add_src+0x926/0xe30 net/ipv4/igmp.c:2111 ip_mc_source+0x881/0x1000 net/ipv4/igmp.c:2432 do_ip_setsockopt.isra.4+0x16f0/0x2800 net/ipv4/ip_sockglue.c:996 ip_setsockopt+0x27/0x70 net/ipv4/ip_sockglue.c:1246 tcp_setsockopt net/ipv4/tcp.c:3108 [inline] tcp_setsockopt+0x6a/0xd0 net/ipv4/tcp.c:3102 sock_common_setsockopt+0x73/0xf0 net/core/sock.c:3072 __sys_setsockopt+0x13e/0x210 net/socket.c:2011 __do_sys_setsockopt net/socket.c:2022 [inline] __se_sys_setsockopt net/socket.c:2019 [inline] __x64_sys_setsockopt+0xb9/0x150 net/socket.c:2019 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 16912: 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 ip_mc_del1_src+0x52e/0x740 net/ipv4/igmp.c:1900 ip_mc_del_src+0x3d3/0x8e0 net/ipv4/igmp.c:1941 ip_mc_leave_src+0xd7/0x200 net/ipv4/igmp.c:2247 ip_mc_drop_socket+0x10d/0x210 net/ipv4/igmp.c:2701 inet_release+0x47/0x1b0 net/ipv4/af_inet.c:414 __sock_release+0xc2/0x290 net/socket.c:599 sock_close+0x10/0x20 net/socket.c:1212 __fput+0x249/0x7f0 fs/file_table.c:278 ____fput+0x9/0x10 fs/file_table.c:309 task_work_run+0x108/0x180 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x185/0x1e0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x413/0x4e0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880aab33d00 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of 64-byte region [ffff8880aab33d00, ffff8880aab33d40) The buggy address belongs to the page: page:ffffea0002aaccc0 count:1 mapcount:0 mapping:ffff88813bff6340 index:0x0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea000255aa88 ffffea0002648848 ffff88813bff6340 raw: 0000000000000000 ffff8880aab33000 0000000100000020 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880aab33c00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880aab33c80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc >ffff8880aab33d00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff8880aab33d80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880aab33e00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ==================================================================