================================================================== BUG: KASAN: use-after-free in memcpy include/linux/fortify-string.h:191 [inline] BUG: KASAN: use-after-free in page_to_skb+0x5cf/0xb70 drivers/net/virtio_net.c:480 Read of size 12 at addr ffff88802e8df800 by task systemd-udevd/6489 CPU: 1 PID: 6489 Comm: systemd-udevd Not tainted 5.12.0-rc8-next-20210420-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:436 check_region_inline mm/kasan/generic.c:180 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:186 memcpy+0x20/0x60 mm/kasan/shadow.c:65 memcpy include/linux/fortify-string.h:191 [inline] page_to_skb+0x5cf/0xb70 drivers/net/virtio_net.c:480 receive_mergeable drivers/net/virtio_net.c:1009 [inline] receive_buf+0x2bc0/0x6250 drivers/net/virtio_net.c:1119 virtnet_receive drivers/net/virtio_net.c:1411 [inline] virtnet_poll+0x568/0x10b0 drivers/net/virtio_net.c:1516 __napi_poll+0xaf/0x440 net/core/dev.c:6962 napi_poll net/core/dev.c:7029 [inline] net_rx_action+0x801/0xb40 net/core/dev.c:7116 __do_softirq+0x29b/0x9fe kernel/softirq.c:559 invoke_softirq kernel/softirq.c:433 [inline] __irq_exit_rcu+0x136/0x200 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 common_interrupt+0xa4/0xd0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:623 RIP: 0010:check_kcov_mode kernel/kcov.c:163 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x7/0x60 kernel/kcov.c:197 Code: ff ff b9 ff ff ff ff ba 08 00 00 00 4d 8b 03 48 0f bd ca 49 8b 45 00 48 63 c9 e9 64 ff ff ff 0f 1f 40 00 65 8b 05 f9 7b 8d 7e <89> c1 48 8b 34 24 81 e1 00 01 00 00 65 48 8b 14 25 00 f0 01 00 a9 RSP: 0018:ffffc90003dbf750 EFLAGS: 00000246 RAX: 0000000080000000 RBX: ffff888016523980 RCX: ffff888015d93900 RDX: 0000000000000000 RSI: ffff888015d93900 RDI: 0000000000000003 RBP: dffffc0000000000 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff83961ab8 R11: 0000000000000000 R12: ffffc90003dbf850 R13: ffff888140885d90 R14: 0000000000000000 R15: 0000000000000000 tomoyo_check_acl+0x23a/0x450 security/tomoyo/domain.c:171 tomoyo_path_permission security/tomoyo/file.c:586 [inline] tomoyo_path_permission+0x1ff/0x3a0 security/tomoyo/file.c:573 tomoyo_check_open_permission+0x30f/0x380 security/tomoyo/file.c:780 tomoyo_file_open security/tomoyo/tomoyo.c:313 [inline] tomoyo_file_open+0xa3/0xd0 security/tomoyo/tomoyo.c:308 security_file_open+0x52/0x4f0 security/security.c:1633 do_dentry_open+0x358/0x11b0 fs/open.c:813 do_open fs/namei.c:3361 [inline] path_openat+0x1c09/0x27d0 fs/namei.c:3494 do_filp_open+0x190/0x3d0 fs/namei.c:3521 do_sys_openat2+0x16d/0x420 fs/open.c:1187 do_sys_open fs/open.c:1203 [inline] __do_sys_open fs/open.c:1211 [inline] __se_sys_open fs/open.c:1207 [inline] __x64_sys_open+0x119/0x1c0 fs/open.c:1207 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f582ead86f0 Code: 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 83 3d 19 30 2c 00 00 75 10 b8 02 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe 9d 01 00 48 89 04 24 RSP: 002b:00007ffd40c444b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f582ead86f0 RDX: 0000000000000180 RSI: 00000000000800c2 RDI: 00005622878926c0 RBP: 000000000003a2f8 R08: 000000000000fe00 R09: 0000000000000030 R10: 0000000000000000 R11: 0000000000000246 R12: 00005622878926d6 R13: 8421084210842109 R14: 00000000000800c2 R15: 00007f582eb66540 The buggy address belongs to the page: page:ffffea0000ba37c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2e8df flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 ffffea0000ba37c8 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88802e8df700: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88802e8df780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88802e8df800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88802e8df880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88802e8df900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================