================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/fortify-string.h:191 [inline] BUG: KASAN: slab-out-of-bounds in skb_put_data include/linux/skbuff.h:2297 [inline] BUG: KASAN: slab-out-of-bounds in qrtr_endpoint_post+0x5c0/0x11b0 net/qrtr/qrtr.c:503 Read of size 4294967294 at addr ffff88802330f890 by task syz-executor.1/12299 CPU: 1 PID: 12299 Comm: syz-executor.1 Not tainted 5.13.0-rc2-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/0x2c6 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] skb_put_data include/linux/skbuff.h:2297 [inline] qrtr_endpoint_post+0x5c0/0x11b0 net/qrtr/qrtr.c:503 qrtr_tun_write_iter+0x10e/0x1b0 net/qrtr/tun.c:108 call_write_iter include/linux/fs.h:2114 [inline] new_sync_write+0x426/0x650 fs/read_write.c:518 vfs_write+0x796/0xa30 fs/read_write.c:605 ksys_write+0x12d/0x250 fs/read_write.c:658 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x4665d9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f8e72910188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 00000000004665d9 RDX: 0000000000000010 RSI: 00000000200003c0 RDI: 0000000000000004 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffdb5118f5f R14: 00007f8e72910300 R15: 0000000000022000 Allocated by task 12299: 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+0x98/0xc0 mm/kasan/common.c:516 kasan_kmalloc include/linux/kasan.h:246 [inline] __do_kmalloc mm/slab.c:3702 [inline] __kmalloc+0x22a/0x4d0 mm/slab.c:3711 kmalloc include/linux/slab.h:561 [inline] kzalloc include/linux/slab.h:686 [inline] qrtr_tun_write_iter+0xc2/0x1b0 net/qrtr/tun.c:99 call_write_iter include/linux/fs.h:2114 [inline] new_sync_write+0x426/0x650 fs/read_write.c:518 vfs_write+0x796/0xa30 fs/read_write.c:605 ksys_write+0x12d/0x250 fs/read_write.c:658 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 ffff88802330f880 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 16 bytes inside of 32-byte region [ffff88802330f880, ffff88802330f8a0) The buggy address belongs to the page: page:ffffea00008cc3c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88802330ffc1 pfn:0x2330f flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea00007aaa88 ffffea000065a048 ffff888011040100 raw: ffff88802330ffc1 ffff88802330f000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2420c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE), pid 1, ts 10181076802, free_ts 10032757112 prep_new_page mm/page_alloc.c:2358 [inline] get_page_from_freelist+0x1033/0x2b60 mm/page_alloc.c:3994 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5200 __alloc_pages_node include/linux/gfp.h:549 [inline] kmem_getpages mm/slab.c:1377 [inline] cache_grow_begin+0x75/0x460 mm/slab.c:2593 cache_alloc_refill+0x27f/0x380 mm/slab.c:2965 ____cache_alloc mm/slab.c:3048 [inline] ____cache_alloc mm/slab.c:3031 [inline] __do_cache_alloc mm/slab.c:3275 [inline] slab_alloc mm/slab.c:3316 [inline] __do_kmalloc mm/slab.c:3700 [inline] __kmalloc+0x3eb/0x4d0 mm/slab.c:3711 kmalloc include/linux/slab.h:561 [inline] kzalloc include/linux/slab.h:686 [inline] kobject_get_path+0xbe/0x230 lib/kobject.c:179 kobject_uevent_env+0x265/0x1650 lib/kobject_uevent.c:529 device_add+0xb71/0x2100 drivers/base/core.c:3301 platform_device_add+0x363/0x820 drivers/base/platform.c:748 init+0x5d5/0xba7 arch/x86/crypto/des3_ede_glue.c:371 do_one_initcall+0x103/0x650 init/main.c:1249 do_initcall_level init/main.c:1322 [inline] do_initcalls init/main.c:1338 [inline] do_basic_setup init/main.c:1358 [inline] kernel_init_freeable+0x643/0x6cc init/main.c:1560 kernel_init+0xd/0x1b8 init/main.c:1447 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1298 [inline] free_pcp_prepare+0x223/0x300 mm/page_alloc.c:1342 free_unref_page_prepare mm/page_alloc.c:3250 [inline] free_unref_page_list+0x19b/0x7c0 mm/page_alloc.c:3318 release_pages+0x853/0x2120 mm/swap.c:972 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:242 [inline] tlb_flush_mmu mm/mmu_gather.c:249 [inline] tlb_finish_mmu+0x165/0x8c0 mm/mmu_gather.c:340 exit_mmap+0x2c2/0x590 mm/mmap.c:3210 __mmput+0x122/0x470 kernel/fork.c:1096 mmput+0x58/0x60 kernel/fork.c:1117 free_bprm+0x65/0x2e0 fs/exec.c:1478 kernel_execve+0x380/0x460 fs/exec.c:1975 call_usermodehelper_exec_async+0x2e3/0x580 kernel/umh.c:112 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Memory state around the buggy address: ffff88802330f780: 00 fc fc fc fc fc fc fc fa fb fb fb fc fc fc fc ffff88802330f800: 00 00 fc fc fc fc fc fc 00 00 00 00 fc fc fc fc >ffff88802330f880: 00 00 fc fc fc fc fc fc 00 00 00 00 fc fc fc fc ^ ffff88802330f900: 00 00 fc fc fc fc fc fc 00 00 00 fc fc fc fc fc ffff88802330f980: 00 fc fc fc fc fc fc fc 00 07 fc fc fc fc fc fc ==================================================================