================================================================== BUG: KASAN: slab-out-of-bounds in qrtr_endpoint_post+0x11ba/0x1340 net/qrtr/qrtr.c:511 Read of size 4 at addr ffff8880238484ac by task syz-executor.5/12966 CPU: 1 PID: 12966 Comm: syz-executor.5 Not tainted 5.14.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1ae/0x29f lib/dump_stack.c:105 print_address_description+0x66/0x3b0 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report+0x163/0x210 mm/kasan/report.c:436 qrtr_endpoint_post+0x11ba/0x1340 net/qrtr/qrtr.c:511 qrtr_tun_write_iter+0x106/0x160 net/qrtr/tun.c:108 call_write_iter include/linux/fs.h:2114 [inline] new_sync_write fs/read_write.c:518 [inline] vfs_write+0xa39/0xc90 fs/read_write.c:605 ksys_write+0x171/0x2a0 fs/read_write.c:658 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x4665e9 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:00007f0eee3b9188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9 RDX: 0000000000000020 RSI: 0000000020000040 RDI: 0000000000000003 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffe58d4a7cf R14: 00007f0eee3b9300 R15: 0000000000022000 Allocated by task 12966: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc+0xc4/0xf0 mm/kasan/common.c:513 kasan_kmalloc include/linux/kasan.h:264 [inline] __kmalloc+0xb4/0x390 mm/slub.c:4104 kmalloc include/linux/slab.h:596 [inline] kzalloc include/linux/slab.h:721 [inline] qrtr_tun_write_iter+0xbd/0x160 net/qrtr/tun.c:99 call_write_iter include/linux/fs.h:2114 [inline] new_sync_write fs/read_write.c:518 [inline] vfs_write+0xa39/0xc90 fs/read_write.c:605 ksys_write+0x171/0x2a0 fs/read_write.c:658 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff888023848480 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 12 bytes to the right of 32-byte region [ffff888023848480, ffff8880238484a0) The buggy address belongs to the page: page:ffffea00008e1200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x23848 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0000ad21c0 0000001500000003 ffff888011041500 raw: 0000000000000000 0000000080400040 00000001ffffffff 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 43, ts 9463888573, free_ts 9462558331 prep_new_page mm/page_alloc.c:2436 [inline] get_page_from_freelist+0x779/0xa30 mm/page_alloc.c:4169 __alloc_pages+0x26c/0x5f0 mm/page_alloc.c:5391 alloc_slab_page mm/slub.c:1688 [inline] allocate_slab+0xf1/0x540 mm/slub.c:1828 new_slab mm/slub.c:1891 [inline] new_slab_objects mm/slub.c:2637 [inline] ___slab_alloc+0x1cf/0x350 mm/slub.c:2800 __slab_alloc mm/slub.c:2840 [inline] slab_alloc_node mm/slub.c:2922 [inline] slab_alloc mm/slub.c:2964 [inline] __kmalloc+0x2e7/0x390 mm/slub.c:4100 kmalloc include/linux/slab.h:596 [inline] kzalloc include/linux/slab.h:721 [inline] lsm_task_alloc security/security.c:613 [inline] security_task_alloc+0x42/0x1e0 security/security.c:1642 copy_process+0x16aa/0x5b00 kernel/fork.c:2101 kernel_clone+0x21a/0x7d0 kernel/fork.c:2509 kernel_thread+0x146/0x1c0 kernel/fork.c:2561 call_usermodehelper_exec_work+0x57/0x220 kernel/umh.c:174 process_one_work+0x833/0x10c0 kernel/workqueue.c:2276 worker_thread+0xac1/0x1320 kernel/workqueue.c:2422 kthread+0x453/0x480 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1346 [inline] free_pcp_prepare+0xc29/0xd20 mm/page_alloc.c:1397 free_unref_page_prepare mm/page_alloc.c:3332 [inline] free_unref_page+0x7e/0x550 mm/page_alloc.c:3411 mm_free_pgd kernel/fork.c:636 [inline] __mmdrop+0xae/0x3f0 kernel/fork.c:687 free_bprm+0x136/0x2f0 fs/exec.c:1479 kernel_execve+0x740/0x9a0 fs/exec.c:1976 call_usermodehelper_exec_async+0x262/0x3b0 kernel/umh.c:112 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff888023848380: 00 00 01 fc fc fc fc fc 00 00 01 fc fc fc fc fc ffff888023848400: 00 00 00 00 fc fc fc fc fa fb fb fb fc fc fc fc >ffff888023848480: 00 00 00 00 fc fc fc fc 00 00 01 fc fc fc fc fc ^ ffff888023848500: 00 00 01 fc fc fc fc fc 00 00 01 fc fc fc fc fc ffff888023848580: 00 00 01 fc fc fc fc fc 00 00 01 fc fc fc fc fc ==================================================================