loop4: p2 < > p3 p4 ================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:261 [inline] BUG: KASAN: use-after-free in deliver_ptype_list_skb net/core/dev.c:1967 [inline] BUG: KASAN: use-after-free in __netif_receive_skb_core+0x2b84/0x3270 net/core/dev.c:4910 Read of size 8 at addr ffff88809b907ef0 by task syz-executor.4/27015 CPU: 0 PID: 27015 Comm: syz-executor.4 Not tainted 4.19.202-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+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433 __read_once_size include/linux/compiler.h:261 [inline] deliver_ptype_list_skb net/core/dev.c:1967 [inline] __netif_receive_skb_core+0x2b84/0x3270 net/core/dev.c:4910 __netif_receive_skb_one_core+0xae/0x180 net/core/dev.c:4952 __netif_receive_skb+0x27/0x1c0 net/core/dev.c:5066 process_backlog+0x241/0x700 net/core/dev.c:5849 napi_poll net/core/dev.c:6280 [inline] net_rx_action+0x4ac/0xfb0 net/core/dev.c:6346 __do_softirq+0x265/0x980 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x215/0x260 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1098 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 RIP: 0010:__rcu_read_unlock+0x104/0x160 kernel/rcu/tree_plugin.h:430 Code: d2 75 62 8b 83 74 03 00 00 85 c0 75 69 48 b8 00 00 00 00 00 fc ff df 48 89 ea 48 c1 ea 03 0f b6 04 02 84 c0 74 04 3c 03 7e 42 83 70 03 00 00 00 00 00 00 e9 34 ff ff ff 0f 0b 5b 5d c3 48 89 RSP: 0018:ffff888096c9f3f8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: ffff88803e768680 RCX: ffffc9000e486000 RDX: 1ffff11007ced13e RSI: ffffffff816d0eca RDI: ffff88803e7689f4 RBP: ffff88803e7689f0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000074071 R12: 0000000000000000 R13: 0000000000000000 R14: ffff88813bff01c0 R15: 0000000000000020 rcu_read_unlock include/linux/rcupdate.h:680 [inline] is_bpf_text_address+0xdf/0x1b0 kernel/bpf/core.c:547 kernel_text_address kernel/extable.c:152 [inline] kernel_text_address+0xbd/0xf0 kernel/extable.c:122 __kernel_text_address+0x9/0x30 kernel/extable.c:107 unwind_get_return_address arch/x86/kernel/unwind_orc.c:297 [inline] unwind_get_return_address+0x51/0x90 arch/x86/kernel/unwind_orc.c:292 __save_stack_trace+0xaf/0x190 arch/x86/kernel/stacktrace.c:45 save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:553 slab_post_alloc_hook mm/slab.h:445 [inline] slab_alloc mm/slab.c:3397 [inline] __do_kmalloc mm/slab.c:3725 [inline] __kmalloc+0x144/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] kzalloc include/linux/slab.h:709 [inline] kobject_get_path+0xbf/0x240 lib/kobject.c:171 kobject_uevent_env+0x25c/0x1480 lib/kobject_uevent.c:527 rescan_partitions+0x23d/0x970 block/partition-generic.c:565 __blkdev_reread_part+0x189/0x220 block/ioctl.c:173 blkdev_reread_part+0x23/0x40 block/ioctl.c:193 loop_reread_partitions drivers/block/loop.c:645 [inline] loop_set_status+0x103e/0x1800 drivers/block/loop.c:1330 loop_set_status64+0xb2/0x110 drivers/block/loop.c:1450 lo_ioctl+0x41f/0x20e0 drivers/block/loop.c:1593 __blkdev_driver_ioctl block/ioctl.c:303 [inline] blkdev_ioctl+0x5cb/0x1a80 block/ioctl.c:601 block_ioctl+0xe9/0x130 fs/block_dev.c:1906 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4663a7 Code: 3c 1c 48 f7 d8 49 39 c4 72 b8 e8 a4 48 02 00 85 c0 78 bd 48 83 c4 08 4c 89 e0 5b 41 5c c3 0f 1f 44 00 00 b8 10 00 00 00 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:00007f26f7e4cef8 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f26f7e4cf40 RCX: 00000000004663a7 RDX: 00007f26f7e4d050 RSI: 0000000000004c04 RDI: 0000000000000005 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 00007f26f7e4d050 R13: 00007fffc142434f R14: 00007f26f7e4d300 R15: 0000000000022000 Allocated by task 27045: __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15a/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] sk_prot_alloc+0x1e2/0x2d0 net/core/sock.c:1466 sk_alloc+0x36/0xec0 net/core/sock.c:1520 packet_create+0x117/0x850 net/packet/af_packet.c:3259 __sock_create+0x3d8/0x740 net/socket.c:1363 sock_create net/socket.c:1414 [inline] __sys_socket+0xef/0x200 net/socket.c:1456 __do_sys_socket net/socket.c:1465 [inline] __se_sys_socket net/socket.c:1463 [inline] __x64_sys_socket+0x6f/0xb0 net/socket.c:1463 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 27006: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 sk_prot_free net/core/sock.c:1503 [inline] __sk_destruct+0x684/0x8a0 net/core/sock.c:1584 sk_destruct net/core/sock.c:1599 [inline] __sk_free+0x165/0x3b0 net/core/sock.c:1610 sk_free+0x3b/0x50 net/core/sock.c:1621 sock_put include/net/sock.h:1711 [inline] packet_release+0x890/0xb70 net/packet/af_packet.c:3088 __sock_release+0xcd/0x2a0 net/socket.c:599 sock_close+0x15/0x20 net/socket.c:1212 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x251/0x2a0 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+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88809b907700 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 2032 bytes inside of 2048-byte region [ffff88809b907700, ffff88809b907f00) The buggy address belongs to the page: page:ffffea00026e4180 count:1 mapcount:0 mapping:ffff88813bff0c40 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea0002cd2b08 ffffea0001084308 ffff88813bff0c40 raw: 0000000000000000 ffff88809b906600 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809b907d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809b907e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809b907e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809b907f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809b907f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================