================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:381 [inline] BUG: KASAN: slab-out-of-bounds in skb_put_data include/linux/skbuff.h:2286 [inline] BUG: KASAN: slab-out-of-bounds in qrtr_endpoint_post+0x545/0x1020 net/qrtr/qrtr.c:486 Read of size 4294967294 at addr ffff8880a7f46a10 by task syz-executor.2/8460 CPU: 1 PID: 8460 Comm: syz-executor.2 Not tainted 5.7.0-rc4-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+0x128/0x182 lib/dump_stack.c:118 print_address_description.constprop.8.cold.10+0x9/0x317 mm/kasan/report.c:382 __kasan_report.cold.11+0x35/0x4d mm/kasan/report.c:511 kasan_report+0x32/0x50 mm/kasan/common.c:625 check_memory_region_inline mm/kasan/generic.c:187 [inline] check_memory_region+0x1c1/0x1e0 mm/kasan/generic.c:193 memcpy+0x1f/0x60 mm/kasan/common.c:106 memcpy include/linux/string.h:381 [inline] skb_put_data include/linux/skbuff.h:2286 [inline] qrtr_endpoint_post+0x545/0x1020 net/qrtr/qrtr.c:486 qrtr_tun_write_iter+0xc2/0x120 net/qrtr/tun.c:92 call_write_iter include/linux/fs.h:1907 [inline] new_sync_write+0x417/0x6c0 fs/read_write.c:484 vfs_write+0x18b/0x490 fs/read_write.c:559 ksys_write+0xec/0x1c0 fs/read_write.c:612 do_syscall_64+0xc6/0x620 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x45cc79 Code: 2d 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 fb b5 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f1e56cf5c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00000000000382c0 RCX: 000000000045cc79 RDX: 0000000000000010 RSI: 0000000020000040 RDI: 0000000000000003 RBP: 000000000078bf40 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000078bf0c R13: 00007fff8304eccf R14: 00007f1e56cf69c0 R15: 000000000078bf0c Allocated by task 8460: save_stack+0x19/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] __kasan_kmalloc.constprop.17+0xc1/0xd0 mm/kasan/common.c:495 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc+0x164/0x7b0 mm/slab.c:3665 kmalloc include/linux/slab.h:560 [inline] kzalloc include/linux/slab.h:669 [inline] qrtr_tun_write_iter+0x84/0x120 net/qrtr/tun.c:83 call_write_iter include/linux/fs.h:1907 [inline] new_sync_write+0x417/0x6c0 fs/read_write.c:484 vfs_write+0x18b/0x490 fs/read_write.c:559 ksys_write+0xec/0x1c0 fs/read_write.c:612 do_syscall_64+0xc6/0x620 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 Freed by task 4115: save_stack+0x19/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] kasan_set_free_info mm/kasan/common.c:317 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:456 __cache_free mm/slab.c:3426 [inline] kfree+0x107/0x2b0 mm/slab.c:3757 tomoyo_check_open_permission+0x15f/0x300 security/tomoyo/file.c:786 security_file_open+0x3f/0x320 security/security.c:1548 do_dentry_open+0x2d7/0x1050 fs/open.c:784 do_open fs/namei.c:3229 [inline] path_openat+0xd15/0x21c0 fs/namei.c:3346 do_filp_open+0x171/0x240 fs/namei.c:3373 do_sys_openat2+0x2dc/0x500 fs/open.c:1148 do_sys_open+0x85/0xd0 fs/open.c:1164 do_syscall_64+0xc6/0x620 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 The buggy address belongs to the object at ffff8880a7f46a00 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 16 bytes inside of 32-byte region [ffff8880a7f46a00, ffff8880a7f46a20) The buggy address belongs to the page: page:ffffea00029fd180 refcount:1 mapcount:0 mapping:00000000d99ace5e index:0xffff8880a7f46fc1 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea0002682648 ffffea00029a75c8 ffff8880aa4001c0 raw: ffff8880a7f46fc1 ffff8880a7f46000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a7f46900: 00 03 fc fc fc fc fc fc 00 01 fc fc fc fc fc fc ffff8880a7f46980: fb fb fb fb fc fc fc fc 00 00 01 fc fc fc fc fc >ffff8880a7f46a00: 00 00 fc fc fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff8880a7f46a80: 00 00 01 fc fc fc fc fc 06 fc fc fc fc fc fc fc ffff8880a7f46b00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================