==================================================================
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 ffff8880960c5b40 by task syz-executor.0/25461

CPU: 0 PID: 25461 Comm: syz-executor.0 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
 ppp_get_filter drivers/net/ppp/ppp_generic.c:584 [inline]
 ppp_ioctl+0x12f7/0x2750 drivers/net/ppp/ppp_generic.c:801
 vfs_ioctl fs/ioctl.c:47 [inline]
 file_ioctl fs/ioctl.c:539 [inline]
 do_vfs_ioctl+0xdb6/0x13e0 fs/ioctl.c:726
 ksys_ioctl+0xab/0xd0 fs/ioctl.c:743
 __do_sys_ioctl fs/ioctl.c:750 [inline]
 __se_sys_ioctl fs/ioctl.c:748 [inline]
 __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:748
 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45a679
Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f2ab4ec8c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045a679
RDX: 0000000020000040 RSI: 0000000040107446 RDI: 0000000000000003
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f2ab4ec96d4
R13: 00000000004c45dc R14: 00000000004d9b30 R15: 00000000ffffffff

Allocated by task 25461:
 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
 ppp_get_filter drivers/net/ppp/ppp_generic.c:584 [inline]
 ppp_ioctl+0x12f7/0x2750 drivers/net/ppp/ppp_generic.c:801
 vfs_ioctl fs/ioctl.c:47 [inline]
 file_ioctl fs/ioctl.c:539 [inline]
 do_vfs_ioctl+0xdb6/0x13e0 fs/ioctl.c:726
 ksys_ioctl+0xab/0xd0 fs/ioctl.c:743
 __do_sys_ioctl fs/ioctl.c:750 [inline]
 __se_sys_ioctl fs/ioctl.c:748 [inline]
 __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:748
 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 9095:
 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_check_open_permission+0x19e/0x3e0 security/tomoyo/file.c:786
 tomoyo_file_open security/tomoyo/tomoyo.c:319 [inline]
 tomoyo_file_open+0xa9/0xd0 security/tomoyo/tomoyo.c:314
 security_file_open+0x71/0x300 security/security.c:1497
 do_dentry_open+0x37a/0x1380 fs/open.c:784
 vfs_open+0xa0/0xd0 fs/open.c:914
 do_last fs/namei.c:3412 [inline]
 path_openat+0x10e4/0x4710 fs/namei.c:3529
 do_filp_open+0x1a1/0x280 fs/namei.c:3559
 do_sys_open+0x3fe/0x5d0 fs/open.c:1097
 __do_sys_open fs/open.c:1115 [inline]
 __se_sys_open fs/open.c:1110 [inline]
 __x64_sys_open+0x7e/0xc0 fs/open.c:1110
 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 ffff8880960c5b40
 which belongs to the cache kmalloc-32 of size 32
The buggy address is located 0 bytes inside of
 32-byte region [ffff8880960c5b40, ffff8880960c5b60)
The buggy address belongs to the page:
page:ffffea0002583140 refcount:1 mapcount:0 mapping:ffff8880aa4001c0 index:0xffff8880960c5fc1
raw: 00fffe0000000200 ffffea000235b7c8 ffffea0002669cc8 ffff8880aa4001c0
raw: ffff8880960c5fc1 ffff8880960c5000 000000010000003f 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880960c5a00: 05 fc fc fc fc fc fc fc 00 01 fc fc fc fc fc fc
 ffff8880960c5a80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc
>ffff8880960c5b00: fb fb fb fb fc fc fc fc 00 fc fc fc fc fc fc fc
                                              ^
 ffff8880960c5b80: 00 00 00 01 fc fc fc fc 00 00 00 fc fc fc fc fc
 ffff8880960c5c00: 00 00 05 fc fc fc fc fc fb fb fb fb fc fc fc fc
==================================================================