================================================================== BUG: KASAN: slab-out-of-bounds in vsscanf+0x2666/0x2ef0 lib/vsprintf.c:3321 Read of size 1 at addr ffff8880a0e57276 by task syz-executor.0/1251 CPU: 1 PID: 1251 Comm: syz-executor.0 Not tainted 5.8.0-rc7-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: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:00007f623e178c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000038600 RCX: 000000000045cc79 RDX: 0000000000000075 RSI: 0000000020000280 RDI: 0000000000000008 RBP: 000000000078c080 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000078c04c R13: 00007ffdd8b1385f R14: 00007f623e1799c0 R15: 000000000078c04c Allocated by task 1251: 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 1089: 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 nf_conntrack_free net/netfilter/nf_conntrack_core.c:1557 [inline] destroy_conntrack+0x342/0x470 net/netfilter/nf_conntrack_core.c:628 nf_conntrack_destroy+0xde/0x1b0 net/netfilter/core.c:600 nf_conntrack_put include/linux/netfilter/nf_conntrack_common.h:34 [inline] nf_conntrack_in+0x87d/0x10ac net/netfilter/nf_conntrack_core.c:1868 nf_hook_entry_hookfn include/linux/netfilter.h:135 [inline] nf_hook_slow+0xb2/0x1f0 net/netfilter/core.c:512 nf_hook+0x209/0x330 include/linux/netfilter.h:262 __ip_local_out+0x293/0x510 net/ipv4/ip_output.c:114 ip_local_out+0x26/0x130 net/ipv4/ip_output.c:123 iptunnel_xmit+0x470/0x7e0 net/ipv4/ip_tunnel_core.c:81 ip_tunnel_xmit+0x14ff/0x2540 net/ipv4/ip_tunnel.c:816 __gre_xmit net/ipv4/ip_gre.c:466 [inline] ipgre_xmit+0x7d1/0xae0 net/ipv4/ip_gre.c:650 __netdev_start_xmit include/linux/netdevice.h:4611 [inline] netdev_start_xmit include/linux/netdevice.h:4625 [inline] xmit_one net/core/dev.c:3556 [inline] dev_hard_start_xmit+0x1bd/0x3d0 net/core/dev.c:3572 __dev_queue_xmit+0x1bda/0x2940 net/core/dev.c:4131 __bpf_tx_skb net/core/filter.c:2086 [inline] __bpf_redirect_no_mac net/core/filter.c:2111 [inline] __bpf_redirect+0x62a/0xd50 net/core/filter.c:2134 ____bpf_clone_redirect net/core/filter.c:2165 [inline] bpf_clone_redirect+0x245/0x350 net/core/filter.c:2137 0xffffffffa0050c3c bpf_dispatcher_nop_func include/linux/bpf.h:556 [inline] bpf_test_run+0x61d/0x8e0 net/bpf/test_run.c:49 bpf_prog_test_run_skb+0x6ce/0x15e0 net/bpf/test_run.c:459 bpf_prog_test_run kernel/bpf/syscall.c:2983 [inline] __do_sys_bpf+0x3ee9/0x10de0 kernel/bpf/syscall.c:4135 do_syscall_64+0x73/0xe0 arch/x86/entry/common.c:384 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8880a0e57200 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 118 bytes inside of 128-byte region [ffff8880a0e57200, ffff8880a0e57280) The buggy address belongs to the page: page:ffffea00028395c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880a0e57500 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00027dbec8 ffffea00025f61c8 ffff8880aa400700 raw: ffff8880a0e57500 ffff8880a0e57000 000000010000000f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a0e57100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a0e57180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a0e57200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 fc ^ ffff8880a0e57280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a0e57300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================