================================================================== 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 ffff88801564f800 by task systemd/1 CPU: 0 PID: 1 Comm: systemd 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:tomoyo_check_acl+0x235/0x450 security/tomoyo/domain.c:171 Code: 89 fa 83 e2 07 38 d0 7f 08 84 c0 0f 85 8d 01 00 00 41 c6 44 24 49 01 48 83 c4 30 5b 5d 41 5c 41 5d 41 5e 41 5f e9 1b 58 de fd 16 58 de fd 48 89 d8 48 89 de 48 c1 e8 03 83 e6 07 0f b6 0c 28 RSP: 0018:ffffc90000c67a18 EFLAGS: 00000246 RAX: 0000000000000000 RBX: ffff88801e174580 RCX: ffff888140128000 RDX: 0000000000000000 RSI: ffff888140128000 RDI: 0000000000000003 RBP: dffffc0000000000 R08: 0000000096ac8d02 R09: 0000000000000000 R10: ffffffff83961ab8 R11: 0000000000000000 R12: ffffc90000c67b48 R13: ffff888144ffba90 R14: 0000000000000000 R15: 0000000000000000 tomoyo_path_permission security/tomoyo/file.c:586 [inline] tomoyo_path_permission+0x1ff/0x3a0 security/tomoyo/file.c:573 tomoyo_path_perm+0x2f0/0x400 security/tomoyo/file.c:838 security_inode_getattr+0xcf/0x140 security/security.c:1332 vfs_getattr fs/stat.c:139 [inline] vfs_statx+0x164/0x390 fs/stat.c:207 vfs_fstatat fs/stat.c:225 [inline] vfs_lstat include/linux/fs.h:3384 [inline] __do_sys_newlstat+0x91/0x110 fs/stat.c:380 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 RIP: 0033:0x7f391c97d335 Code: 69 db 2b 00 64 c7 00 16 00 00 00 b8 ff ff ff ff c3 0f 1f 40 00 83 ff 01 48 89 f0 77 30 48 89 c7 48 89 d6 b8 06 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 03 f3 c3 90 48 8b 15 31 db 2b 00 f7 d8 64 89 RAX: ffffffffffffffda RBX: 000055e893dbb8c0 RCX: 00007f391c97d335 RDX: 00007ffdbb36d6f0 RSI: 00007ffdbb36d6f0 RDI: 000055e893dba8c0 RBP: 00007ffdbb36d7b0 R08: 0000000000000003 R09: 0000000000001010 R10: 0000000000000040 R11: 0000000000000246 R12: 000055e893dba8c0 R13: 000055e893dba8d6 R14: 000055e893d9507d R15: 000055e893d95086 page:ffffea00005593c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1564f flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 ffffea00005593c8 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88801564f780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88801564f800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88801564f880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88801564f900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== CPU: 0 PID: 1 Comm: systemd Tainted: G B 5.12.0-rc8-next-20210420-syzkaller #0 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 panic+0x306/0x73d kernel/panic.c:231 end_report mm/kasan/report.c:103 [inline] end_report.cold+0x5a/0x5a mm/kasan/report.c:88 __kasan_report mm/kasan/report.c:426 [inline] kasan_report.cold+0x6a/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:tomoyo_check_acl+0x235/0x450 security/tomoyo/domain.c:171 Code: 89 fa 83 e2 07 38 d0 7f 08 84 c0 0f 85 8d 01 00 00 41 c6 44 24 49 01 48 83 c4 30 5b 5d 41 5c 41 5d 41 5e 41 5f e9 1b 58 de fd 16 58 de fd 48 89 d8 48 89 de 48 c1 e8 03 83 e6 07 0f b6 0c 28 RSP: 0018:ffffc90000c67a18 EFLAGS: 00000246 RAX: 0000000000000000 RBX: ffff88801e174580 RCX: ffff888140128000 RDX: 0000000000000000 RSI: ffff888140128000 RDI: 0000000000000003 RBP: dffffc0000000000 R08: 0000000096ac8d02 R09: 0000000000000000 R10: ffffffff83961ab8 R11: 0000000000000000 R12: ffffc90000c67b48 R13: ffff888144ffba90 R14: 0000000000000000 R15: 0000000000000000 tomoyo_path_permission security/tomoyo/file.c:586 [inline] tomoyo_path_permission+0x1ff/0x3a0 security/tomoyo/file.c:573 tomoyo_path_perm+0x2f0/0x400 security/tomoyo/file.c:838 security_inode_getattr+0xcf/0x140 security/security.c:1332 vfs_getattr fs/stat.c:139 [inline] vfs_statx+0x164/0x390 fs/stat.c:207 vfs_fstatat fs/stat.c:225 [inline] vfs_lstat include/linux/fs.h:3384 [inline] __do_sys_newlstat+0x91/0x110 fs/stat.c:380 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f391c97d335 Code: 69 db 2b 00 64 c7 00 16 00 00 00 b8 ff ff ff ff c3 0f 1f 40 00 83 ff 01 48 89 f0 77 30 48 89 c7 48 89 d6 b8 06 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 03 f3 c3 90 48 8b 15 31 db 2b 00 f7 d8 64 89 RSP: 002b:00007ffdbb36d6b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000006 RAX: ffffffffffffffda RBX: 000055e893dbb8c0 RCX: 00007f391c97d335 RDX: 00007ffdbb36d6f0 RSI: 00007ffdbb36d6f0 RDI: 000055e893dba8c0 RBP: 00007ffdbb36d7b0 R08: 0000000000000003 R09: 0000000000001010 R10: 0000000000000040 R11: 0000000000000246 R12: 000055e893dba8c0 R13: 000055e893dba8d6 R14: 000055e893d9507d R15: 000055e893d95086 Kernel Offset: disabled Rebooting in 86400 seconds..