hid-generic 0000:0000:0000.04C6: unknown main item tag 0x2 hid-generic 0000:0000:0000.04C6: hidraw0: HID v4.00 Device [syz1] on syz1 ================================================================== BUG: KASAN: slab-out-of-bounds in ipt_init_target+0x213/0x250 net/sched/act_ipt.c:46 Read of size 1 at addr ffff8880aa180a9f by task syz-executor.1/13562 CPU: 0 PID: 13562 Comm: syz-executor.1 Not tainted 4.14.285-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/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_load1_noabort+0x68/0x70 mm/kasan/report.c:427 ipt_init_target+0x213/0x250 net/sched/act_ipt.c:46 __tcf_ipt_init+0x48d/0xc00 net/sched/act_ipt.c:168 tcf_ipt_init+0x43/0x50 net/sched/act_ipt.c:202 tcf_action_init_1+0x51a/0x9e0 net/sched/act_api.c:691 tcf_action_init+0x26d/0x400 net/sched/act_api.c:760 tcf_action_add net/sched/act_api.c:1088 [inline] tc_ctl_action+0x2e3/0x510 net/sched/act_api.c:1140 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4322 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2454 netlink_unicast_kernel net/netlink/af_netlink.c:1296 [inline] netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1322 netlink_sendmsg+0x648/0xbc0 net/netlink/af_netlink.c:1893 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 ___sys_sendmsg+0x6c8/0x800 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:0x7f630d107109 RSP: 002b:00007f630ba7c168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f630d219f60 RCX: 00007f630d107109 RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003 RBP: 00007f630d16105d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcde7c4a4f R14: 00007f630ba7c300 R15: 0000000000022000 Allocated by task 13562: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 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:119 kmemdup include/linux/string.h:449 [inline] __tcf_ipt_init+0x464/0xc00 net/sched/act_ipt.c:164 tcf_ipt_init+0x43/0x50 net/sched/act_ipt.c:202 tcf_action_init_1+0x51a/0x9e0 net/sched/act_api.c:691 tcf_action_init+0x26d/0x400 net/sched/act_api.c:760 tcf_action_add net/sched/act_api.c:1088 [inline] tc_ctl_action+0x2e3/0x510 net/sched/act_api.c:1140 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4322 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2454 netlink_unicast_kernel net/netlink/af_netlink.c:1296 [inline] netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1322 netlink_sendmsg+0x648/0xbc0 net/netlink/af_netlink.c:1893 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 ___sys_sendmsg+0x6c8/0x800 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 8005: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 kvfree+0x45/0x50 mm/util.c:449 __vunmap+0x20f/0x300 mm/vmalloc.c:1548 vfree+0x4b/0xd0 mm/vmalloc.c:1612 copy_entries_to_user net/ipv4/netfilter/ip_tables.c:867 [inline] get_entries net/ipv4/netfilter/ip_tables.c:1025 [inline] do_ipt_get_ctl+0x5c7/0x7a0 net/ipv4/netfilter/ip_tables.c:1704 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x62/0xc0 net/netfilter/nf_sockopt.c:122 ip_getsockopt net/ipv4/ip_sockglue.c:1566 [inline] ip_getsockopt+0x105/0x150 net/ipv4/ip_sockglue.c:1551 tcp_getsockopt+0x7b/0xc0 net/ipv4/tcp.c:3259 SYSC_getsockopt net/socket.c:1896 [inline] SyS_getsockopt+0x102/0x1c0 net/socket.c:1878 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 ffff8880aa180a80 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 31 bytes inside of 32-byte region [ffff8880aa180a80, ffff8880aa180aa0) The buggy address belongs to the page: page:ffffea0002a86000 count:1 mapcount:0 mapping:ffff8880aa180000 index:0xffff8880aa180fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880aa180000 ffff8880aa180fc1 000000010000003d raw: ffffea0002785220 ffffea0002d12ee0 ffff88813fe741c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880aa180980: fb fb fb fb fc fc fc fc 00 00 04 fc fc fc fc fc ffff8880aa180a00: fb fb fb fb fc fc fc fc 00 07 fc fc fc fc fc fc >ffff8880aa180a80: 03 fc fc fc fc fc fc fc 00 01 fc fc fc fc fc fc ^ ffff8880aa180b00: fb fb fb fb fc fc fc fc 00 03 fc fc fc fc fc fc ffff8880aa180b80: 00 03 fc fc fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================