================================================================== 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 ffff888014a5f800 by task systemd-udevd/8445 CPU: 0 PID: 8445 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:ptlock_ptr include/linux/mm.h:2183 [inline] RIP: 0010:pte_lockptr include/linux/mm.h:2207 [inline] RIP: 0010:zap_pte_range mm/memory.c:1228 [inline] RIP: 0010:zap_pmd_range mm/memory.c:1374 [inline] RIP: 0010:zap_pud_range mm/memory.c:1403 [inline] RIP: 0010:zap_p4d_range mm/memory.c:1424 [inline] RIP: 0010:unmap_page_range+0x1642/0x2650 mm/memory.c:1445 Code: ff 48 c1 e3 0c 48 b8 00 00 00 00 00 ea ff ff 48 c1 eb 18 48 c1 e3 06 48 01 c3 48 8d 7b 28 48 89 f8 48 c1 e8 03 42 80 3c 30 00 <0f> 85 f6 0d 00 00 48 8b 43 28 48 bb 00 f0 ff ff ff ff 0f 00 48 89 RSP: 0018:ffffc900018cf9d0 EFLAGS: 00000246 RAX: 1ffffd4000156165 RBX: ffffea0000ab0b00 RCX: 0000000000000000 RDX: ffff88801ab2d580 RSI: ffffffff81a84b19 RDI: ffffea0000ab0b28 RBP: 000000002ac2c067 R08: 0000000000000000 R09: ffffc900018cfac8 R10: ffffffff81a83c80 R11: 0000000000000000 R12: 000000000002ac2c R13: 00000000000007b8 R14: dffffc0000000000 R15: 0000000000000000 unmap_single_vma+0x198/0x300 mm/memory.c:1490 unmap_vmas+0x16d/0x2f0 mm/memory.c:1522 exit_mmap+0x2a8/0x590 mm/mmap.c:3207 __mmput+0x122/0x470 kernel/fork.c:1095 mmput+0x58/0x60 kernel/fork.c:1116 exit_mm kernel/exit.c:502 [inline] do_exit+0xb0a/0x2a70 kernel/exit.c:813 do_group_exit+0x125/0x310 kernel/exit.c:923 __do_sys_exit_group kernel/exit.c:934 [inline] __se_sys_exit_group kernel/exit.c:932 [inline] __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:932 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7fe0c4d5f618 Code: Unable to access opcode bytes at RIP 0x7fe0c4d5f5ee. RSP: 002b:00007ffce3411c38 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 00007ffce3411d00 RCX: 00007fe0c4d5f618 RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 RBP: 00007ffce3411db0 R08: 00000000000000e7 R09: fffffffffffffe50 R10: 00000000ffffffff R11: 0000000000000206 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000003 R15: 000000000000000e Allocated by task 1: 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_kmalloc mm/kasan/common.c:507 [inline] ____kasan_kmalloc mm/kasan/common.c:466 [inline] __kasan_kmalloc+0x9b/0xd0 mm/kasan/common.c:516 kmalloc include/linux/slab.h:563 [inline] tomoyo_realpath_from_path+0xc3/0x620 security/tomoyo/realpath.c:254 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x21b/0x400 security/tomoyo/file.c:822 security_inode_getattr+0xcf/0x140 security/security.c:1332 vfs_getattr fs/stat.c:139 [inline] vfs_fstat+0x43/0xb0 fs/stat.c:164 __do_sys_newfstat+0x81/0x100 fs/stat.c:404 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 1: 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] kfree+0xe5/0x7f0 mm/slub.c:4245 tomoyo_realpath_from_path+0x191/0x620 security/tomoyo/realpath.c:291 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x21b/0x400 security/tomoyo/file.c:822 security_inode_getattr+0xcf/0x140 security/security.c:1332 vfs_getattr fs/stat.c:139 [inline] vfs_fstat+0x43/0xb0 fs/stat.c:164 __do_sys_newfstat+0x81/0x100 fs/stat.c:404 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 ffff888014a5e000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 2048 bytes to the right of 4096-byte region [ffff888014a5e000, ffff888014a5f000) The buggy address belongs to the page: page:ffffea0000529600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x14a58 head:ffffea0000529600 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888010c42140 raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888014a5f700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888014a5f780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888014a5f800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888014a5f880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888014a5f900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================