================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/fortify-string.h:191 [inline] BUG: KASAN: slab-out-of-bounds in page_to_skb+0x5cf/0xb70 drivers/net/virtio_net.c:480 Read of size 12 at addr ffff888015dff800 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:preempt_count arch/x86/include/asm/preempt.h:27 [inline] RIP: 0010:check_kcov_mode kernel/kcov.c:163 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x0/0x60 kernel/kcov.c:197 Code: f0 4d 89 03 e9 f2 fc 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 RSP: 0018:ffffc90000c67968 EFLAGS: 00000293 RAX: 0000000000000000 RBX: ffffc90000c67c50 RCX: 0000000000000000 RDX: ffff888011f58000 RSI: ffffffff81c7c520 RDI: 0000000000000003 RBP: ffffc90000c679e8 R08: 0000000000000000 R09: 0000000000000001 R10: ffffffff81c7c516 R11: 000000000000002f R12: 0000000000000200 R13: 0000000000000000 R14: ffffffff8c0f6360 R15: ffffffff8c0f63b0 __seqprop_spinlock_sequence include/linux/seqlock.h:277 [inline] set_root+0x1a6/0x5a0 fs/namei.c:912 nd_jump_root+0x3c7/0x570 fs/namei.c:933 path_init+0x1028/0x1910 fs/namei.c:2331 path_openat+0x180/0x27d0 fs/namei.c:3489 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:0x7ff46e58d85d Code: bb 20 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 1e f6 ff ff 48 89 04 24 b8 02 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 67 f6 ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007ffda04f4ff0 EFLAGS: 00000293 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007ffda04f5080 RCX: 00007ff46e58d85d RDX: 0000000000000001 RSI: 00000000000a0100 RDI: 000055559410a930 RBP: 0000000000000008 R08: 000055559411f20a R09: 0000000000000020 R10: 0000000000000000 R11: 0000000000000293 R12: 000055559410a944 R13: 000055559410d6e0 R14: 00007ffda04f5010 R15: 000055559411f1e0 Allocated by task 6374: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:428 [inline] __kasan_slab_alloc+0x84/0xa0 mm/kasan/common.c:461 kasan_slab_alloc include/linux/kasan.h:236 [inline] slab_post_alloc_hook mm/slab.h:527 [inline] slab_alloc_node mm/slub.c:2924 [inline] slab_alloc mm/slub.c:2932 [inline] kmem_cache_alloc+0x219/0x3a0 mm/slub.c:2937 getname_flags.part.0+0x50/0x4f0 fs/namei.c:138 getname_flags include/linux/audit.h:319 [inline] getname+0x8e/0xd0 fs/namei.c:209 do_sys_openat2+0xf5/0x420 fs/open.c:1181 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 Freed by task 6374: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:357 ____kasan_slab_free mm/kasan/common.c:360 [inline] ____kasan_slab_free mm/kasan/common.c:325 [inline] __kasan_slab_free+0xfb/0x130 mm/kasan/common.c:368 kasan_slab_free include/linux/kasan.h:212 [inline] slab_free_hook mm/slub.c:1593 [inline] slab_free_freelist_hook+0xdf/0x240 mm/slub.c:1618 slab_free mm/slub.c:3178 [inline] kmem_cache_free+0x97/0x750 mm/slub.c:3194 putname+0xe1/0x120 fs/namei.c:259 do_sys_openat2+0x153/0x420 fs/open.c:1196 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 The buggy address belongs to the object at ffff888015dfe600 which belongs to the cache names_cache of size 4096 The buggy address is located 512 bytes to the right of 4096-byte region [ffff888015dfe600, ffff888015dff600) The buggy address belongs to the page: page:ffffea0000577e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x15df8 head:ffffea0000577e00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888010dbd280 raw: 0000000000000000 0000000000070007 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888015dff700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888015dff780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888015dff800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888015dff880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888015dff900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================