================================================================== BUG: KASAN: slab-out-of-bounds in ipt_init_target+0x206/0x240 net/sched/act_ipt.c:46 Read of size 1 at addr ffff88809144cd9f by task syz-executor.2/11442 CPU: 0 PID: 11442 Comm: syz-executor.2 Not tainted 4.14.181-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x283 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1dc mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2b9 mm/kasan/report.c:393 ipt_init_target+0x206/0x240 net/sched/act_ipt.c:46 __tcf_ipt_init+0x455/0xaf0 net/sched/act_ipt.c:168 tcf_xt_init+0x43/0x50 net/sched/act_ipt.c:210 tcf_action_init_1+0x51a/0x9f0 net/sched/act_api.c:682 tcf_action_init+0x26d/0x400 net/sched/act_api.c:751 tcf_action_add net/sched/act_api.c:1079 [inline] tc_ctl_action+0x2e3/0x513 net/sched/act_api.c:1131 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4315 netlink_rcv_skb+0x127/0x370 net/netlink/af_netlink.c:2433 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1313 netlink_sendmsg+0x64a/0xbb0 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 ___sys_sendmsg+0x70a/0x840 net/socket.c:2062 __sys_sendmsg+0xa3/0x120 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45ca29 RSP: 002b:00007f24db2f8c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000500f80 RCX: 000000000045ca29 RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000003 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000a05 R14: 00000000004ccddd R15: 00007f24db2f96d4 Allocated by task 11442: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.0+0x4f/0xd0 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc_track_caller+0x155/0x400 mm/slab.c:3735 kmemdup+0x23/0x50 mm/util.c:118 kmemdup include/linux/string.h:420 [inline] __tcf_ipt_init+0x431/0xaf0 net/sched/act_ipt.c:164 tcf_xt_init+0x43/0x50 net/sched/act_ipt.c:210 tcf_action_init_1+0x51a/0x9f0 net/sched/act_api.c:682 tcf_action_init+0x26d/0x400 net/sched/act_api.c:751 tcf_action_add net/sched/act_api.c:1079 [inline] tc_ctl_action+0x2e3/0x513 net/sched/act_api.c:1131 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4315 netlink_rcv_skb+0x127/0x370 net/netlink/af_netlink.c:2433 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1313 netlink_sendmsg+0x64a/0xbb0 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 ___sys_sendmsg+0x70a/0x840 net/socket.c:2062 __sys_sendmsg+0xa3/0x120 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 3625: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xaf/0x190 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcb/0x260 mm/slab.c:3815 security_cred_free+0x71/0xb0 security/security.c:1003 put_cred_rcu+0xe3/0x300 kernel/cred.c:117 __put_cred+0x1a1/0x210 kernel/cred.c:151 put_cred include/linux/cred.h:271 [inline] SYSC_faccessat fs/open.c:444 [inline] SyS_faccessat+0x52a/0x680 fs/open.c:353 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff88809144cd80 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 31 bytes inside of 32-byte region [ffff88809144cd80, ffff88809144cda0) The buggy address belongs to the page: page:ffffea0002451300 count:1 mapcount:0 mapping:ffff88809144c000 index:0xffff88809144cfc1 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff88809144c000 ffff88809144cfc1 000000010000003f raw: ffffea0002467420 ffffea0002527220 ffff8880aa8001c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809144cc80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff88809144cd00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff88809144cd80: 00 fc fc fc fc fc fc fc 00 00 fc fc fc fc fc fc ^ ffff88809144ce00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff88809144ce80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================