================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:378 [inline] BUG: KASAN: slab-out-of-bounds in bpf_prog_create+0xe9/0x250 net/core/filter.c:1351 Read of size 64 at addr ffff88809a3b4a80 by task syz-executor.5/11073 CPU: 0 PID: 11073 Comm: syz-executor.5 Not tainted 5.4.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:634 check_memory_region_inline mm/kasan/generic.c:185 [inline] check_memory_region+0x134/0x1a0 mm/kasan/generic.c:192 memcpy+0x24/0x50 mm/kasan/common.c:122 memcpy include/linux/string.h:378 [inline] bpf_prog_create+0xe9/0x250 net/core/filter.c:1351 get_filter.isra.0+0x108/0x1a0 drivers/net/ppp/ppp_generic.c:572 compat_ppp_get_filter drivers/net/ppp/ppp_generic.c:605 [inline] ppp_compat_ioctl+0x298/0x42b drivers/net/ppp/ppp_generic.c:867 __do_compat_sys_ioctl fs/compat_ioctl.c:202 [inline] __se_compat_sys_ioctl fs/compat_ioctl.c:142 [inline] __ia32_compat_sys_ioctl+0x22d/0x5c0 fs/compat_ioctl.c:142 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline] do_fast_syscall_32+0x27b/0xe16 arch/x86/entry/common.c:408 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7fc2a39 Code: 00 00 00 89 d3 5b 5e 5f 5d c3 b8 80 96 98 00 eb c4 8b 04 24 c3 8b 1c 24 c3 8b 34 24 c3 8b 3c 24 c3 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000f5dbe0cc EFLAGS: 00000296 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000040087446 RDX: 0000000020000040 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 11073: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc mm/kasan/common.c:510 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:483 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:524 __do_kmalloc mm/slab.c:3655 [inline] __kmalloc_track_caller+0x15f/0x760 mm/slab.c:3670 memdup_user+0x26/0xb0 mm/util.c:172 get_filter.isra.0+0xd7/0x1a0 drivers/net/ppp/ppp_generic.c:568 compat_ppp_get_filter drivers/net/ppp/ppp_generic.c:605 [inline] ppp_compat_ioctl+0x298/0x42b drivers/net/ppp/ppp_generic.c:867 __do_compat_sys_ioctl fs/compat_ioctl.c:202 [inline] __se_compat_sys_ioctl fs/compat_ioctl.c:142 [inline] __ia32_compat_sys_ioctl+0x22d/0x5c0 fs/compat_ioctl.c:142 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline] do_fast_syscall_32+0x27b/0xe16 arch/x86/entry/common.c:408 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 9022: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] kasan_set_free_info mm/kasan/common.c:332 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:471 kasan_slab_free+0xe/0x10 mm/kasan/common.c:480 __cache_free mm/slab.c:3425 [inline] kfree+0x10a/0x2c0 mm/slab.c:3756 tomoyo_path2_perm+0x2b3/0x670 security/tomoyo/file.c:947 tomoyo_path_rename+0xee/0x150 security/tomoyo/tomoyo.c:285 security_path_rename+0x20c/0x300 security/security.c:1079 do_renameat2+0x7b8/0xc40 fs/namei.c:4619 __do_sys_rename fs/namei.c:4669 [inline] __se_sys_rename fs/namei.c:4667 [inline] __x64_sys_rename+0x61/0x80 fs/namei.c:4667 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88809a3b4a80 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff88809a3b4a80, ffff88809a3b4aa0) The buggy address belongs to the page: page:ffffea000268ed00 refcount:1 mapcount:0 mapping:ffff8880aa4001c0 index:0xffff88809a3b4fc1 raw: 00fffe0000000200 ffffea00024a7288 ffffea000266fbc8 ffff8880aa4001c0 raw: ffff88809a3b4fc1 ffff88809a3b4000 0000000100000030 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809a3b4980: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff88809a3b4a00: fb fb fb fb fc fc fc fc 05 fc fc fc fc fc fc fc >ffff88809a3b4a80: 00 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff88809a3b4b00: 05 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ffff88809a3b4b80: 05 fc fc fc fc fc fc fc 05 fc fc fc fc fc fc fc ==================================================================