================================================================== 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 ffff8880155c7800 by task systemd-udevd/6463 CPU: 0 PID: 6463 Comm: systemd-udevd Not tainted 5.12.0-rc8-next-20210419-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:__sanitizer_cov_trace_const_cmp1+0x0/0x80 kernel/kcov.c:269 Code: 39 fe 72 1f 48 83 c2 01 4c 89 44 38 e8 48 c7 44 38 e0 06 00 00 00 48 89 4c 38 f0 4e 89 54 c8 20 48 89 10 c3 66 0f 1f 44 00 00 <53> 41 89 fb 41 89 f1 bf 03 00 00 00 65 48 8b 0c 25 00 f0 01 00 48 RSP: 0018:ffffc90003b373e0 EFLAGS: 00000246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff888023314b00 R08: 0000000000000000 R09: 0000000000000010 R10: ffffffff83970a5a R11: 0000000000000010 R12: 0000000000000020 R13: 0000000000000177 R14: dffffc0000000000 R15: 0000000000000000 tomoyo_domain_quota_is_ok+0x186/0x550 security/tomoyo/util.c:1059 tomoyo_supervisor+0x2f2/0xf00 security/tomoyo/common.c:2089 tomoyo_audit_path_number_log security/tomoyo/file.c:235 [inline] tomoyo_path_number_perm+0x419/0x590 security/tomoyo/file.c:734 tomoyo_path_mknod+0x10d/0x190 security/tomoyo/tomoyo.c:240 security_path_mknod+0xf9/0x170 security/security.c:1131 may_o_create fs/namei.c:3036 [inline] lookup_open.isra.0+0x475/0x13d0 fs/namei.c:3178 open_last_lookups fs/namei.c:3285 [inline] path_openat+0x9af/0x27d0 fs/namei.c:3491 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:0x7f6160e036f0 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:00007ffd74fe0928 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f6160e036f0 RDX: 0000000000000180 RSI: 00000000000800c2 RDI: 000055fdc8ba3080 RBP: 000000000003a2f8 R08: 000000000000fefe R09: 0000000000000030 R10: 0000000000000000 R11: 0000000000000246 R12: 000055fdc8ba3094 R13: 8421084210842109 R14: 00000000000800c2 R15: 00007f6160e91540 general protection fault, probably for non-canonical address 0xdead000000000418: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 6463 Comm: systemd-udevd Not tainted 5.12.0-rc8-next-20210419-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:nearest_obj include/linux/slub_def.h:171 [inline] RIP: 0010:print_address_description.constprop.0.cold+0xbf/0x2f8 mm/kasan/report.c:238 Code: 00 48 8b 00 f6 c4 02 0f 84 71 ff ff ff 48 8b 5d 18 b9 0b 00 00 00 b8 11 ff ff 01 48 c1 e1 29 48 c1 e0 27 48 01 e9 48 c1 f9 06 <8b> 73 18 48 c1 e1 0c 48 01 c1 4c 89 e0 48 29 c8 48 99 48 f7 fe 0f RSP: 0018:ffffc90000007970 EFLAGS: 00010002 RAX: ffff888000000000 RBX: dead000000000400 RCX: 00000000000155c7 RDX: ffffea0000557001 RSI: ffffffff815c7505 RDI: fffff52000000f20 RBP: ffffea00005571c0 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff815c134e R11: 0000000000000000 R12: ffff8880155c7800 R13: ffffffff84c11f2f R14: ffffffff84c11f2f R15: ffff8881432e4c00 FS: 00007f6161f918c0(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fccf8bb66d0 CR3: 000000001d9bb000 CR4: 00000000001506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __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:__sanitizer_cov_trace_const_cmp1+0x0/0x80 kernel/kcov.c:269 Code: 39 fe 72 1f 48 83 c2 01 4c 89 44 38 e8 48 c7 44 38 e0 06 00 00 00 48 89 4c 38 f0 4e 89 54 c8 20 48 89 10 c3 66 0f 1f 44 00 00 <53> 41 89 fb 41 89 f1 bf 03 00 00 00 65 48 8b 0c 25 00 f0 01 00 48 RSP: 0018:ffffc90003b373e0 EFLAGS: 00000246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff888023314b00 R08: 0000000000000000 R09: 0000000000000010 R10: ffffffff83970a5a R11: 0000000000000010 R12: 0000000000000020 R13: 0000000000000177 R14: dffffc0000000000 R15: 0000000000000000 tomoyo_domain_quota_is_ok+0x186/0x550 security/tomoyo/util.c:1059 tomoyo_supervisor+0x2f2/0xf00 security/tomoyo/common.c:2089 tomoyo_audit_path_number_log security/tomoyo/file.c:235 [inline] tomoyo_path_number_perm+0x419/0x590 security/tomoyo/file.c:734 tomoyo_path_mknod+0x10d/0x190 security/tomoyo/tomoyo.c:240 security_path_mknod+0xf9/0x170 security/security.c:1131 may_o_create fs/namei.c:3036 [inline] lookup_open.isra.0+0x475/0x13d0 fs/namei.c:3178 open_last_lookups fs/namei.c:3285 [inline] path_openat+0x9af/0x27d0 fs/namei.c:3491 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:0x7f6160e036f0 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:00007ffd74fe0928 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f6160e036f0 RDX: 0000000000000180 RSI: 00000000000800c2 RDI: 000055fdc8ba3080 RBP: 000000000003a2f8 R08: 000000000000fefe R09: 0000000000000030 R10: 0000000000000000 R11: 0000000000000246 R12: 000055fdc8ba3094 R13: 8421084210842109 R14: 00000000000800c2 R15: 00007f6160e91540 Modules linked in: ---[ end trace 15a11c261d2c51d4 ]--- RIP: 0010:nearest_obj include/linux/slub_def.h:171 [inline] RIP: 0010:print_address_description.constprop.0.cold+0xbf/0x2f8 mm/kasan/report.c:238 Code: 00 48 8b 00 f6 c4 02 0f 84 71 ff ff ff 48 8b 5d 18 b9 0b 00 00 00 b8 11 ff ff 01 48 c1 e1 29 48 c1 e0 27 48 01 e9 48 c1 f9 06 <8b> 73 18 48 c1 e1 0c 48 01 c1 4c 89 e0 48 29 c8 48 99 48 f7 fe 0f RSP: 0018:ffffc90000007970 EFLAGS: 00010002 RAX: ffff888000000000 RBX: dead000000000400 RCX: 00000000000155c7 RDX: ffffea0000557001 RSI: ffffffff815c7505 RDI: fffff52000000f20 RBP: ffffea00005571c0 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff815c134e R11: 0000000000000000 R12: ffff8880155c7800 R13: ffffffff84c11f2f R14: ffffffff84c11f2f R15: ffff8881432e4c00 FS: 00007f6161f918c0(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fccf8bb66d0 CR3: 000000001d9bb000 CR4: 00000000001506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400