================================================================== BUG: KASAN: slab-out-of-bounds in ipt_init_target+0x24e/0x290 net/sched/act_ipt.c:46 Read of size 1 at addr ffff88808e85639f by task syz-executor.2/18128 CPU: 1 PID: 18128 Comm: syz-executor.2 Not tainted 4.14.166-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+0x142/0x197 lib/dump_stack.c:58 print_address_description.cold+0x7c/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/0x2af mm/kasan/report.c:393 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:427 ipt_init_target+0x24e/0x290 net/sched/act_ipt.c:46 __tcf_ipt_init+0x48c/0xb50 net/sched/act_ipt.c:168 tcf_xt_init+0x4e/0x60 net/sched/act_ipt.c:210 tcf_action_init_1+0x53c/0xaa0 net/sched/act_api.c:682 tcf_action_init+0x2ab/0x480 net/sched/act_api.c:751 tcf_action_add net/sched/act_api.c:1079 [inline] tc_ctl_action+0x30a/0x548 net/sched/act_api.c:1131 rtnetlink_rcv_msg+0x3da/0xb70 net/core/rtnetlink.c:4306 netlink_rcv_skb+0x14f/0x3c0 net/netlink/af_netlink.c:2432 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:4318 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline] netlink_unicast+0x44d/0x650 net/netlink/af_netlink.c:1312 netlink_sendmsg+0x7c4/0xc60 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xce/0x110 net/socket.c:656 ___sys_sendmsg+0x70a/0x840 net/socket.c:2062 __sys_sendmsg+0xb9/0x140 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2103 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x45b349 RSP: 002b:00007f6f7842cc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f6f7842d6d4 RCX: 000000000045b349 RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000099f R14: 00000000004cb163 R15: 000000000075bf2c Allocated by task 18128: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:529 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc_track_caller+0x159/0x790 mm/slab.c:3735 kmemdup+0x27/0x60 mm/util.c:118 kmemdup include/linux/string.h:420 [inline] __tcf_ipt_init+0x463/0xb50 net/sched/act_ipt.c:164 tcf_xt_init+0x4e/0x60 net/sched/act_ipt.c:210 tcf_action_init_1+0x53c/0xaa0 net/sched/act_api.c:682 tcf_action_init+0x2ab/0x480 net/sched/act_api.c:751 tcf_action_add net/sched/act_api.c:1079 [inline] tc_ctl_action+0x30a/0x548 net/sched/act_api.c:1131 rtnetlink_rcv_msg+0x3da/0xb70 net/core/rtnetlink.c:4306 netlink_rcv_skb+0x14f/0x3c0 net/netlink/af_netlink.c:2432 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:4318 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline] netlink_unicast+0x44d/0x650 net/netlink/af_netlink.c:1312 netlink_sendmsg+0x7c4/0xc60 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xce/0x110 net/socket.c:656 ___sys_sendmsg+0x70a/0x840 net/socket.c:2062 __sys_sendmsg+0xb9/0x140 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2103 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 16467: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 tty_free_file drivers/tty/tty_io.c:219 [inline] tty_del_file drivers/tty/tty_io.c:231 [inline] tty_release+0x8e1/0xd60 drivers/tty/tty_io.c:1745 __fput+0x275/0x7a0 fs/file_table.c:210 ____fput+0x16/0x20 fs/file_table.c:244 task_work_run+0x114/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1da/0x220 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4bc/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff88808e856380 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 31 bytes inside of 32-byte region [ffff88808e856380, ffff88808e8563a0) The buggy address belongs to the page: page:ffffea00023a1580 count:1 mapcount:0 mapping:ffff88808e856000 index:0xffff88808e856fc1 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff88808e856000 ffff88808e856fc1 0000000100000039 raw: ffffea0002827460 ffffea0002a1bfe0 ffff8880aa8001c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808e856280: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff88808e856300: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff88808e856380: 04 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff88808e856400: fb fb fb fb fc fc fc fc 00 01 fc fc fc fc fc fc ffff88808e856480: fb fb fb fb fc fc fc fc 00 01 fc fc fc fc fc fc ==================================================================