================================================================== BUG: KASAN: slab-out-of-bounds in vsscanf+0x2666/0x2ef0 lib/vsprintf.c:3321 Read of size 1 at addr ffff888092ccf238 by task syz-executor.5/29801 CPU: 1 PID: 29801 Comm: syz-executor.5 Not tainted 5.8.0-rc5-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+0x1f0/0x31e lib/dump_stack.c:118 print_address_description+0x66/0x5a0 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report+0x132/0x1d0 mm/kasan/report.c:530 vsscanf+0x2666/0x2ef0 lib/vsprintf.c:3321 sscanf+0x6c/0x90 lib/vsprintf.c:3527 smk_set_cipso+0x374/0x6c0 security/smack/smackfs.c:908 vfs_write+0x2dd/0xc70 fs/read_write.c:576 ksys_write+0x11b/0x220 fs/read_write.c:631 do_syscall_64+0x73/0xe0 arch/x86/entry/common.c:384 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45c1d9 Code: Bad RIP value. RSP: 002b:00007f06137d3c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000037240 RCX: 000000000045c1d9 RDX: 0000000000000037 RSI: 0000000020000040 RDI: 0000000000000003 RBP: 000000000078bf40 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000078bf0c R13: 00007ffef04e9e3f R14: 00007f06137d49c0 R15: 000000000078bf0c Allocated by task 29801: save_stack mm/kasan/common.c:48 [inline] set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc+0x103/0x140 mm/kasan/common.c:494 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc_track_caller+0x249/0x320 mm/slab.c:3671 memdup_user_nul+0x26/0xf0 mm/util.c:259 smk_set_cipso+0xff/0x6c0 security/smack/smackfs.c:859 vfs_write+0x2dd/0xc70 fs/read_write.c:576 ksys_write+0x11b/0x220 fs/read_write.c:631 do_syscall_64+0x73/0xe0 arch/x86/entry/common.c:384 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 9797: save_stack mm/kasan/common.c:48 [inline] set_track mm/kasan/common.c:56 [inline] kasan_set_free_info mm/kasan/common.c:316 [inline] __kasan_slab_free+0x114/0x170 mm/kasan/common.c:455 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x220 mm/slab.c:3757 batadv_tvlv_realloc_packet_buff net/batman-adv/tvlv.c:284 [inline] batadv_tvlv_container_ogm_append+0x1b4/0x4d0 net/batman-adv/tvlv.c:318 batadv_iv_ogm_schedule_buff net/batman-adv/bat_iv_ogm.c:812 [inline] batadv_iv_ogm_schedule+0x215/0xf40 net/batman-adv/bat_iv_ogm.c:869 batadv_iv_send_outstanding_bat_ogm_packet+0x68c/0x7c0 net/batman-adv/bat_iv_ogm.c:1722 process_one_work+0x789/0xfc0 kernel/workqueue.c:2269 worker_thread+0xaa4/0x1460 kernel/workqueue.c:2415 kthread+0x37e/0x3a0 drivers/block/aoe/aoecmd.c:1234 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293 The buggy address belongs to the object at ffff888092ccf200 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 56 bytes inside of 64-byte region [ffff888092ccf200, ffff888092ccf240) The buggy address belongs to the page: page:ffffea00024b33c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888092ccf100 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea000263e648 ffffea0002a33748 ffff8880aa400380 raw: ffff888092ccf100 ffff888092ccf000 000000010000001b 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888092ccf100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888092ccf180: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff888092ccf200: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc ^ ffff888092ccf280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888092ccf300: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ==================================================================