================================================================== BUG: KASAN: slab-out-of-bounds in test_bit include/asm-generic/bitops/instrumented-non-atomic.h:110 [inline] BUG: KASAN: slab-out-of-bounds in bitmap_ip_do_test net/netfilter/ipset/ip_set_bitmap_ip.c:70 [inline] BUG: KASAN: slab-out-of-bounds in bitmap_ip_test+0xde/0x170 net/netfilter/ipset/ip_set_bitmap_gen.h:122 Read of size 8 at addr ffff8880a5064a00 by task syz-executor.1/30485 CPU: 1 PID: 30485 Comm: syz-executor.1 Not tainted 5.5.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+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:639 check_memory_region_inline mm/kasan/generic.c:185 [inline] check_memory_region+0x134/0x1a0 mm/kasan/generic.c:192 __kasan_check_read+0x11/0x20 mm/kasan/common.c:95 test_bit include/asm-generic/bitops/instrumented-non-atomic.h:110 [inline] bitmap_ip_do_test net/netfilter/ipset/ip_set_bitmap_ip.c:70 [inline] bitmap_ip_test+0xde/0x170 net/netfilter/ipset/ip_set_bitmap_gen.h:122 bitmap_ip_uadt+0x87a/0xa10 net/netfilter/ipset/ip_set_bitmap_ip.c:159 ip_set_utest+0x570/0x8d0 net/netfilter/ipset/ip_set_core.c:1868 nfnetlink_rcv_msg+0xcf2/0xfb0 net/netfilter/nfnetlink.c:229 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 nfnetlink_rcv+0x1ba/0x460 net/netfilter/nfnetlink.c:563 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x58c/0x7d0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:659 ____sys_sendmsg+0x753/0x880 net/socket.c:2330 ___sys_sendmsg+0x100/0x170 net/socket.c:2384 __sys_sendmsg+0x105/0x1d0 net/socket.c:2417 __compat_sys_sendmsg net/compat.c:642 [inline] __do_compat_sys_sendmsg net/compat.c:649 [inline] __se_compat_sys_sendmsg net/compat.c:646 [inline] __ia32_compat_sys_sendmsg+0x7a/0xb0 net/compat.c:646 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline] do_fast_syscall_32+0x27b/0xe16 arch/x86/entry/common.c:408 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f6e9a9 Code: 00 00 00 89 d3 5b 5e 5f 5d c3 b8 80 96 98 00 eb c4 8b 04 24 c3 8b 1c 24 c3 8b 34 24 c3 8b 3c 24 c3 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000f5d6a0cc EFLAGS: 00000296 ORIG_RAX: 0000000000000172 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000020000080 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 20639: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:486 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:527 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc+0x163/0x770 mm/slab.c:3665 kmalloc include/linux/slab.h:561 [inline] kzalloc include/linux/slab.h:670 [inline] ip_set_alloc+0x38/0x5e net/netfilter/ipset/ip_set_core.c:255 init_map_ip net/netfilter/ipset/ip_set_bitmap_ip.c:223 [inline] bitmap_ip_create+0x6ec/0xc20 net/netfilter/ipset/ip_set_bitmap_ip.c:327 ip_set_create+0x6f1/0x1500 net/netfilter/ipset/ip_set_core.c:1111 nfnetlink_rcv_msg+0xcf2/0xfb0 net/netfilter/nfnetlink.c:229 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 nfnetlink_rcv+0x1ba/0x460 net/netfilter/nfnetlink.c:563 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x58c/0x7d0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:659 ____sys_sendmsg+0x753/0x880 net/socket.c:2330 ___sys_sendmsg+0x100/0x170 net/socket.c:2384 __sys_sendmsg+0x105/0x1d0 net/socket.c:2417 __compat_sys_sendmsg net/compat.c:642 [inline] __do_compat_sys_sendmsg net/compat.c:649 [inline] __se_compat_sys_sendmsg net/compat.c:646 [inline] __ia32_compat_sys_sendmsg+0x7a/0xb0 net/compat.c:646 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline] do_fast_syscall_32+0x27b/0xe16 arch/x86/entry/common.c:408 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 9594: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:335 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:474 kasan_slab_free+0xe/0x10 mm/kasan/common.c:483 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x2c0 mm/slab.c:3757 kvfree+0x61/0x70 mm/util.c:603 __vunmap+0x6ba/0x950 mm/vmalloc.c:2311 __vfree+0x41/0xd0 mm/vmalloc.c:2355 vfree+0x5f/0x90 mm/vmalloc.c:2385 compat_copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:1602 [inline] compat_get_entries net/ipv6/netfilter/ip6_tables.c:1632 [inline] compat_do_ip6t_get_ctl+0x691/0x9a0 net/ipv6/netfilter/ip6_tables.c:1662 compat_nf_sockopt net/netfilter/nf_sockopt.c:139 [inline] compat_nf_getsockopt+0x9b/0x140 net/netfilter/nf_sockopt.c:163 compat_ipv6_getsockopt net/ipv6/ipv6_sockglue.c:1439 [inline] compat_ipv6_getsockopt+0x244/0x350 net/ipv6/ipv6_sockglue.c:1410 inet_csk_compat_getsockopt+0x97/0x120 net/ipv4/inet_connection_sock.c:1032 compat_tcp_getsockopt+0x4d/0x80 net/ipv4/tcp.c:3701 compat_sock_common_getsockopt+0xb2/0x140 net/core/sock.c:3119 __compat_sys_getsockopt+0x16c/0x2c0 net/compat.c:418 __do_compat_sys_socketcall net/compat.c:791 [inline] __se_compat_sys_socketcall net/compat.c:719 [inline] __ia32_compat_sys_socketcall+0x5dc/0x710 net/compat.c:719 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline] do_fast_syscall_32+0x27b/0xe16 arch/x86/entry/common.c:408 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 The buggy address belongs to the object at ffff8880a5064a00 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880a5064a00, ffff8880a5064a20) The buggy address belongs to the page: page:ffffea0002941900 refcount:1 mapcount:0 mapping:ffff8880aa4001c0 index:0xffff8880a5064fc1 raw: 00fffe0000000200 ffffea00025ea148 ffffea000277fec8 ffff8880aa4001c0 raw: ffff8880a5064fc1 ffff8880a5064000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a5064900: 00 fc fc fc fc fc fc fc 00 00 fc fc fc fc fc fc ffff8880a5064980: 00 00 fc fc fc fc fc fc 00 00 fc fc fc fc fc fc >ffff8880a5064a00: 04 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff8880a5064a80: 05 fc fc fc fc fc fc fc 00 00 00 00 fc fc fc fc ffff8880a5064b00: fb fb fb fb fc fc fc fc 05 fc fc fc fc fc fc fc ==================================================================