================================================================== BUG: KASAN: slab-out-of-bounds in qrtr_endpoint_post+0xeeb/0x1010 net/qrtr/qrtr.c:462 Read of size 2 at addr ffff888098398ec8 by task syz-executor.5/29231 CPU: 1 PID: 29231 Comm: syz-executor.5 Not tainted 5.8.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:77 [inline] dump_stack+0x18f/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x436 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 qrtr_endpoint_post+0xeeb/0x1010 net/qrtr/qrtr.c:462 qrtr_tun_write_iter+0xf5/0x180 net/qrtr/tun.c:92 call_write_iter include/linux/fs.h:1907 [inline] do_iter_readv_writev+0x567/0x780 fs/read_write.c:694 do_iter_write+0x188/0x5f0 fs/read_write.c:999 compat_writev+0x1ea/0x390 fs/read_write.c:1352 do_compat_pwritev64+0x180/0x1b0 fs/read_write.c:1401 do_syscall_32_irqs_on+0x3f/0x60 arch/x86/entry/common.c:403 __do_fast_syscall_32 arch/x86/entry/common.c:448 [inline] do_fast_syscall_32+0x7f/0x120 arch/x86/entry/common.c:474 entry_SYSENTER_compat+0x6d/0x7c arch/x86/entry/entry_64_compat.S:138 RIP: 0023:0xf7f1c569 Code: Bad RIP value. RSP: 002b:00000000f5d170cc EFLAGS: 00000296 ORIG_RAX: 000000000000014e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000020000440 RDX: 0000000000000001 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 29231: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:494 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc+0x17a/0x340 mm/slab.c:3665 kmalloc include/linux/slab.h:560 [inline] kzalloc include/linux/slab.h:669 [inline] qrtr_tun_write_iter+0x8a/0x180 net/qrtr/tun.c:83 call_write_iter include/linux/fs.h:1907 [inline] do_iter_readv_writev+0x567/0x780 fs/read_write.c:694 do_iter_write+0x188/0x5f0 fs/read_write.c:999 compat_writev+0x1ea/0x390 fs/read_write.c:1352 do_compat_pwritev64+0x180/0x1b0 fs/read_write.c:1401 do_syscall_32_irqs_on+0x3f/0x60 arch/x86/entry/common.c:403 __do_fast_syscall_32 arch/x86/entry/common.c:448 [inline] do_fast_syscall_32+0x7f/0x120 arch/x86/entry/common.c:474 entry_SYSENTER_compat+0x6d/0x7c arch/x86/entry/entry_64_compat.S:138 Freed by task 28726: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] kasan_set_free_info mm/kasan/common.c:316 [inline] __kasan_slab_free+0xf5/0x140 mm/kasan/common.c:455 __cache_free mm/slab.c:3426 [inline] kfree+0x103/0x2c0 mm/slab.c:3757 load_elf_binary+0x595/0x4831 fs/binfmt_elf.c:872 search_binary_handler fs/exec.c:1749 [inline] exec_binprm fs/exec.c:1790 [inline] __do_execve_file+0x1652/0x2ee0 fs/exec.c:1926 do_execveat_common fs/exec.c:1980 [inline] do_execve+0x35/0x50 fs/exec.c:1997 call_usermodehelper_exec_async+0x589/0x710 kernel/umh.c:112 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293 The buggy address belongs to the object at ffff888098398ec0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 8 bytes inside of 32-byte region [ffff888098398ec0, ffff888098398ee0) The buggy address belongs to the page: page:ffffea000260e600 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888098398fc1 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00025b2448 ffffea000274a688 ffff8880aa0001c0 raw: ffff888098398fc1 ffff888098398000 000000010000003b 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888098398d80: 05 fc fc fc fc fc fc fc 05 fc fc fc fc fc fc fc ffff888098398e00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff888098398e80: 00 03 fc fc fc fc fc fc 04 fc fc fc fc fc fc fc ^ ffff888098398f00: fb fb fb fb fc fc fc fc 00 00 02 fc fc fc fc fc ffff888098398f80: 05 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================