================================================================== 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_ipmac_gc_test net/netfilter/ipset/ip_set_bitmap_ipmac.c:102 [inline] BUG: KASAN: slab-out-of-bounds in bitmap_ipmac_gc+0x119/0x590 net/netfilter/ipset/ip_set_bitmap_gen.h:277 Read of size 8 at addr ffff88809aa22c00 by task blkid/9894 CPU: 0 PID: 9894 Comm: blkid 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_ipmac_gc_test net/netfilter/ipset/ip_set_bitmap_ipmac.c:102 [inline] bitmap_ipmac_gc+0x119/0x590 net/netfilter/ipset/ip_set_bitmap_gen.h:277 call_timer_fn+0x1ac/0x780 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers kernel/time/timer.c:1773 [inline] __run_timers kernel/time/timer.c:1740 [inline] run_timer_softirq+0x6c3/0x1790 kernel/time/timer.c:1786 __do_softirq+0x262/0x98c kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x19b/0x1e0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1a3/0x610 arch/x86/kernel/apic/apic.c:1137 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:752 [inline] RIP: 0010:lock_release+0x4c0/0x960 kernel/locking/lockdep.c:4505 Code: 00 00 00 00 00 48 c1 e8 03 80 3c 10 00 0f 85 8c 03 00 00 48 83 3d e7 60 38 08 00 0f 84 7f 01 00 00 48 8b bd 48 ff ff ff 57 9d <0f> 1f 44 00 00 48 b8 00 00 00 00 00 fc ff df 48 01 c3 48 c7 03 00 RSP: 0018:ffffc900161df9c0 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff1326673 RBX: 1ffff92002c3bf3d RCX: 1ffff1100b3089d1 RDX: dffffc0000000000 RSI: 1ffff1100b3089d8 RDI: 0000000000000282 RBP: ffffc900161dfa90 R08: 0000000000000002 R09: ffff888059844e90 R10: fffffbfff14f69d0 R11: ffffffff8a7b4e87 R12: ffff888059844600 R13: ffffffff81a420c2 R14: ffffc900161dfa68 R15: ffff888059844600 __raw_spin_unlock include/linux/spinlock_api_smp.h:150 [inline] _raw_spin_unlock+0x16/0x40 kernel/locking/spinlock.c:183 spin_unlock include/linux/spinlock.h:378 [inline] browse_rb mm/mmap.c:360 [inline] validate_mm+0x382/0x620 mm/mmap.c:420 remove_vma_list mm/mmap.c:2579 [inline] __do_munmap+0x918/0x10f0 mm/mmap.c:2820 do_munmap mm/mmap.c:2828 [inline] mmap_region+0x227/0x1760 mm/mmap.c:1721 do_mmap+0x837/0x1150 mm/mmap.c:1549 do_mmap_pgoff include/linux/mm.h:2338 [inline] vm_mmap_pgoff+0x1c5/0x230 mm/util.c:506 ksys_mmap_pgoff+0x4aa/0x630 mm/mmap.c:1601 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:100 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:91 [inline] __x64_sys_mmap+0xe9/0x1b0 arch/x86/kernel/sys_x86_64.c:91 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f6ca9efc3ea Code: 48 8d 3d 81 69 00 00 b2 84 e8 52 ec ff ff f7 d8 89 05 ae ad 20 00 eb c6 90 90 90 90 90 90 90 90 49 89 ca b8 09 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8d 0d 8a ad 20 00 31 d2 48 29 c2 89 RSP: 002b:00007fff8784fc68 EFLAGS: 00000206 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007f6caa1044c8 RCX: 00007f6ca9efc3ea RDX: 0000000000000003 RSI: 0000000000004000 RDI: 00007f6ca9ee2000 RBP: 00007fff8784ff30 R08: 0000000000000003 R09: 0000000000023000 R10: 0000000000000812 R11: 0000000000000206 R12: 00007fff87850018 R13: 0000000000000002 R14: 00007fff8784fce0 R15: 00007fff8784fcb0 Allocated by task 9834: 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_ipmac net/netfilter/ipset/ip_set_bitmap_ipmac.c:302 [inline] bitmap_ipmac_create+0x4e8/0xa00 net/netfilter/ipset/ip_set_bitmap_ipmac.c:365 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 9602: 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 dccp_feat_init+0x26a/0x310 net/dccp/feat.c:1492 dccp_init_sock+0x320/0x3f0 net/dccp/proto.c:205 dccp_v4_init_sock+0x20/0xa0 net/dccp/ipv4.c:923 inet_create net/ipv4/af_inet.c:379 [inline] inet_create+0x85f/0xdf0 net/ipv4/af_inet.c:247 __sock_create+0x3ce/0x730 net/socket.c:1420 sock_create_kern+0x3b/0x50 net/socket.c:1489 inet_ctl_sock_create+0x9d/0x1f0 net/ipv4/af_inet.c:1629 dccp_v4_init_net+0x57/0x80 net/dccp/ipv4.c:1019 ops_init+0xb3/0x420 net/core/net_namespace.c:137 setup_net+0x2d5/0x8b0 net/core/net_namespace.c:335 copy_net_ns+0x29e/0x5a0 net/core/net_namespace.c:476 create_new_namespaces+0x400/0x860 kernel/nsproxy.c:103 unshare_nsproxy_namespaces+0xc2/0x200 kernel/nsproxy.c:202 ksys_unshare+0x444/0x980 kernel/fork.c:2945 __do_sys_unshare kernel/fork.c:3013 [inline] __se_sys_unshare kernel/fork.c:3011 [inline] __ia32_sys_unshare+0x30/0x40 kernel/fork.c:3011 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 ffff88809aa22c00 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff88809aa22c00, ffff88809aa22c20) The buggy address belongs to the page: page:ffffea00026a8880 refcount:1 mapcount:0 mapping:ffff8880aa4001c0 index:0xffff88809aa22fc1 raw: 00fffe0000000200 ffffea00029ec888 ffffea00026b8608 ffff8880aa4001c0 raw: ffff88809aa22fc1 ffff88809aa22000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809aa22b00: 02 fc fc fc fc fc fc fc 00 fc fc fc fc fc fc fc ffff88809aa22b80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff88809aa22c00: 04 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff88809aa22c80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff88809aa22d00: 00 01 fc fc fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================