TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. XFS (loop5): Invalid superblock magic number REISERFS warning (device loop3): sh-2021 reiserfs_fill_super: can not find reiserfs on loop3 ================================================================== BUG: KASAN: use-after-free in sk_psock_unlink+0x4d8/0x700 net/core/sock_map.c:993 Read of size 4 at addr ffff8881cbe970d8 by task syz-executor1/10121 CPU: 0 PID: 10121 Comm: syz-executor1 Not tainted 4.20.0-rc4+ #131 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+0x244/0x39d lib/dump_stack.c:113 print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.8+0x242/0x309 mm/kasan/report.c:412 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432 sk_psock_unlink+0x4d8/0x700 net/core/sock_map.c:993 tcp_bpf_remove+0xd0/0x130 net/ipv4/tcp_bpf.c:512 tcp_bpf_close+0x1c6/0x4a0 net/ipv4/tcp_bpf.c:552 inet_release+0x104/0x1f0 net/ipv4/af_inet.c:428 inet6_release+0x50/0x70 net/ipv6/af_inet6.c:458 __sock_release+0xd7/0x250 net/socket.c:579 sock_close+0x19/0x20 net/socket.c:1141 __fput+0x385/0xa30 fs/file_table.c:278 ____fput+0x15/0x20 fs/file_table.c:309 task_work_run+0x1e8/0x2a0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x1ad6/0x26d0 kernel/exit.c:867 do_group_exit+0x177/0x440 kernel/exit.c:970 get_signal+0x8b0/0x1980 kernel/signal.c:2517 do_signal+0x9c/0x21c0 arch/x86/kernel/signal.c:816 exit_to_usermode_loop+0x2e5/0x380 arch/x86/entry/common.c:162 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457569 Code: 83 c4 18 c3 e8 d8 64 00 00 48 8b 04 24 48 8b 4c 24 08 48 89 01 e8 d7 2d fc ff e8 22 7a fc ff b8 02 00 00 00 48 8d 0d aa 3c 0c <01> 87 01 8b 05 a2 3c 0c 01 83 f8 01 0f 85 8a 00 00 00 b8 01 00 00 RSP: 002b:00007f61821afc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000084 RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000457569 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000080 RBP: 000000000072c0e0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f61821b06d4 R13: 00000000004c5700 R14: 00000000004d9730 R15: 00000000ffffffff Allocated by task 10121: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 kmem_cache_alloc_trace+0x152/0x750 mm/slab.c:3620 kmalloc include/linux/slab.h:546 [inline] kzalloc include/linux/slab.h:741 [inline] sock_map_alloc+0x1bf/0x400 net/core/sock_map.c:38 find_and_alloc_map kernel/bpf/syscall.c:129 [inline] map_create+0x3bd/0x1110 kernel/bpf/syscall.c:509 __do_sys_bpf kernel/bpf/syscall.c:2489 [inline] __se_sys_bpf kernel/bpf/syscall.c:2466 [inline] __x64_sys_bpf+0x303/0x520 kernel/bpf/syscall.c:2466 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 2254: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x230 mm/slab.c:3817 sock_map_free+0x22a/0x310 net/core/sock_map.c:256 bpf_map_free_deferred+0xd9/0x110 kernel/bpf/syscall.c:290 process_one_work+0xc90/0x1c40 kernel/workqueue.c:2153 worker_thread+0x17f/0x1390 kernel/workqueue.c:2296 kthread+0x35a/0x440 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff8881cbe970c0 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 24 bytes inside of 512-byte region [ffff8881cbe970c0, ffff8881cbe972c0) The buggy address belongs to the page: page:ffffea00072fa5c0 count:1 mapcount:0 mapping:ffff8881da800940 index:0xffff8881cbe97840 flags: 0x2fffc0000000200(slab) raw: 02fffc0000000200 ffffea0006d79908 ffffea0006f06a88 ffff8881da800940 raw: ffff8881cbe97840 ffff8881cbe970c0 0000000100000005 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881cbe96f80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff8881cbe97000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881cbe97080: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8881cbe97100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881cbe97180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================