netlink: 8 bytes leftover after parsing attributes in process `syz-executor6'. ================================================================== BUG: KASAN: slab-out-of-bounds in string+0x1e8/0x200 lib/vsprintf.c:595 Read of size 1 at addr ffff8801cc7e8fd5 by task syz-executor7/7011 CPU: 1 PID: 7011 Comm: syz-executor7 Not tainted 4.15.0-rc9+ #192 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+0x194/0x257 lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x25b/0x340 mm/kasan/report.c:409 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:427 string+0x1e8/0x200 lib/vsprintf.c:595 vsnprintf+0x863/0x1900 lib/vsprintf.c:2282 __request_module+0x1bf/0xc20 kernel/kmod.c:143 xt_request_find_match+0x8b/0xb0 net/netfilter/x_tables.c:215 compat_find_calc_match net/ipv4/netfilter/ip_tables.c:1275 [inline] check_compat_entry_size_and_hooks net/ipv4/netfilter/ip_tables.c:1332 [inline] translate_compat_table+0x586/0x1b90 net/ipv4/netfilter/ip_tables.c:1426 compat_do_replace.isra.15+0x30e/0x720 net/ipv4/netfilter/ip_tables.c:1529 compat_do_ipt_set_ctl+0x106/0x150 net/ipv4/netfilter/ip_tables.c:1558 compat_nf_sockopt net/netfilter/nf_sockopt.c:144 [inline] compat_nf_setsockopt+0x88/0x130 net/netfilter/nf_sockopt.c:156 compat_ip_setsockopt+0x9d/0xf0 net/ipv4/ip_sockglue.c:1285 compat_udp_setsockopt+0x45/0x80 net/ipv4/udp.c:2418 compat_ipv6_setsockopt+0xb2/0x1e0 net/ipv6/ipv6_sockglue.c:945 inet_csk_compat_setsockopt+0x95/0x120 net/ipv4/inet_connection_sock.c:1042 compat_tcp_setsockopt+0x3d/0x70 net/ipv4/tcp.c:2886 compat_sock_common_setsockopt+0xb2/0x140 net/core/sock.c:2979 C_SYSC_setsockopt net/compat.c:403 [inline] compat_SyS_setsockopt+0x17c/0x410 net/compat.c:386 do_syscall_32_irqs_on arch/x86/entry/common.c:327 [inline] do_fast_syscall_32+0x3ee/0xf9d arch/x86/entry/common.c:389 entry_SYSENTER_compat+0x54/0x63 arch/x86/entry/entry_64_compat.S:129 RIP: 0023:0xf7f57c79 RSP: 002b:00000000f775308c EFLAGS: 00000296 ORIG_RAX: 000000000000016e RAX: ffffffffffffffda RBX: 0000000000000014 RCX: 0000000000000000 RDX: 0000000000000040 RSI: 000000002071bd8f RDI: 0000000000000271 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 7011: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 __do_kmalloc_node mm/slab.c:3672 [inline] __kmalloc_node+0x47/0x70 mm/slab.c:3679 kmalloc_node include/linux/slab.h:541 [inline] kvmalloc_node+0x99/0xd0 mm/util.c:397 kvmalloc include/linux/mm.h:541 [inline] xt_alloc_table_info+0x64/0xe0 net/netfilter/x_tables.c:1006 compat_do_replace.isra.15+0x17f/0x720 net/ipv4/netfilter/ip_tables.c:1518 compat_do_ipt_set_ctl+0x106/0x150 net/ipv4/netfilter/ip_tables.c:1558 compat_nf_sockopt net/netfilter/nf_sockopt.c:144 [inline] compat_nf_setsockopt+0x88/0x130 net/netfilter/nf_sockopt.c:156 compat_ip_setsockopt+0x9d/0xf0 net/ipv4/ip_sockglue.c:1285 compat_udp_setsockopt+0x45/0x80 net/ipv4/udp.c:2418 compat_ipv6_setsockopt+0xb2/0x1e0 net/ipv6/ipv6_sockglue.c:945 inet_csk_compat_setsockopt+0x95/0x120 net/ipv4/inet_connection_sock.c:1042 compat_tcp_setsockopt+0x3d/0x70 net/ipv4/tcp.c:2886 compat_sock_common_setsockopt+0xb2/0x140 net/core/sock.c:2979 C_SYSC_setsockopt net/compat.c:403 [inline] compat_SyS_setsockopt+0x17c/0x410 net/compat.c:386 do_syscall_32_irqs_on arch/x86/entry/common.c:327 [inline] do_fast_syscall_32+0x3ee/0xf9d arch/x86/entry/common.c:389 entry_SYSENTER_compat+0x54/0x63 arch/x86/entry/entry_64_compat.S:129 Freed by task 4260: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3488 [inline] kfree+0xd6/0x260 mm/slab.c:3803 skb_free_head+0x74/0xb0 net/core/skbuff.c:550 skb_release_data+0x58c/0x790 net/core/skbuff.c:570 skb_release_all+0x4a/0x60 net/core/skbuff.c:627 __kfree_skb net/core/skbuff.c:641 [inline] consume_skb+0x153/0x490 net/core/skbuff.c:701 netlink_broadcast_filtered+0x5d0/0x1360 net/netlink/af_netlink.c:1477 netlink_broadcast net/netlink/af_netlink.c:1499 [inline] nlmsg_multicast include/net/netlink.h:591 [inline] nlmsg_notify+0x91/0x150 net/netlink/af_netlink.c:2452 rtnl_notify+0xbb/0xe0 net/core/rtnetlink.c:649 inet6_rt_notify+0x1e3/0x290 net/ipv6/route.c:4382 fib6_add_rt2node+0x1be2/0x2490 net/ipv6/ip6_fib.c:1024 fib6_add+0x847/0x1860 net/ipv6/ip6_fib.c:1242 __ip6_ins_rt+0x6c/0x90 net/ipv6/route.c:1006 ip6_route_add+0x141/0x190 net/ipv6/route.c:2785 addrconf_prefix_route+0x3fa/0x630 net/ipv6/addrconf.c:2321 inet6_addr_add+0x2b4/0x380 net/ipv6/addrconf.c:2875 inet6_rtm_newaddr+0x8d2/0xcd0 net/ipv6/addrconf.c:4589 rtnetlink_rcv_msg+0x733/0x1020 net/core/rtnetlink.c:4411 netlink_rcv_skb+0x14b/0x380 net/netlink/af_netlink.c:2409 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:4423 netlink_unicast_kernel net/netlink/af_netlink.c:1275 [inline] netlink_unicast+0x4ee/0x700 net/netlink/af_netlink.c:1301 netlink_sendmsg+0xa4a/0xe60 net/netlink/af_netlink.c:1864 sock_sendmsg_nosec net/socket.c:638 [inline] sock_sendmsg+0xca/0x110 net/socket.c:648 ___sys_sendmsg+0x767/0x8b0 net/socket.c:2028 __sys_sendmsg+0xe5/0x210 net/socket.c:2062 SYSC_sendmsg net/socket.c:2073 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2069 entry_SYSCALL_64_fastpath+0x29/0xa0 The buggy address belongs to the object at ffff8801cc7e8d80 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 597 bytes inside of 1024-byte region [ffff8801cc7e8d80, ffff8801cc7e9180) The buggy address belongs to the page: page:ffffea000731fa00 count:1 mapcount:0 mapping:ffff8801cc7e8000 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffff8801cc7e8000 0000000000000000 0000000100000007 raw: ffffea00073f0520 ffffea0007311aa0 ffff8801dac00ac0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cc7e8e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801cc7e8f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8801cc7e8f80: 00 00 00 00 00 00 00 00 00 00 05 fc fc fc fc fc ^ ffff8801cc7e9000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801cc7e9080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================