================================================================== 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_port_gc_test net/netfilter/ipset/ip_set_bitmap_port.c:67 [inline] BUG: KASAN: slab-out-of-bounds in bitmap_port_gc+0x112/0x4f0 net/netfilter/ipset/ip_set_bitmap_gen.h:277 Read of size 8 at addr ffff888097b72340 by task udevd/17838 CPU: 0 PID: 17838 Comm: udevd Not tainted 5.5.0-rc6-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_port_gc_test net/netfilter/ipset/ip_set_bitmap_port.c:67 [inline] bitmap_port_gc+0x112/0x4f0 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:preempt_count_add+0x0/0x160 kernel/sched/core.c:3779 Code: 8b 55 d0 48 8b 4d d8 eb be 48 89 4d d8 e8 f8 d5 62 00 48 8b 4d d8 eb 84 e8 ed d5 62 00 e9 4c ff ff ff 0f 1f 84 00 00 00 00 00 <48> c7 c0 e0 84 67 8b 55 48 ba 00 00 00 00 00 fc ff df 48 89 c1 48 RSP: 0018:ffffc90005a476e8 EFLAGS: 00000202 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000001 RBX: 0000000000000000 RCX: ffffffff816280c4 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000001 RBP: ffffc90005a476f8 R08: 1ffff11015d0703c R09: ffffed1015d0703d R10: ffffed1015d0703c R11: ffff8880ae8381e3 R12: 0000000000000000 R13: 0000000000000000 R14: ffff888096ca4080 R15: ffff88821bc46c40 kernel_text_address+0x67/0xf0 kernel/extable.c:143 __kernel_text_address+0xd/0x40 kernel/extable.c:104 unwind_get_return_address arch/x86/kernel/unwind_frame.c:19 [inline] unwind_get_return_address+0x61/0xa0 arch/x86/kernel/unwind_frame.c:14 arch_stack_walk+0x97/0xf0 arch/x86/kernel/stacktrace.c:26 stack_trace_save+0xac/0xe0 kernel/stacktrace.c:123 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_slab_alloc+0xf/0x20 mm/kasan/common.c:521 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc mm/slab.c:3320 [inline] kmem_cache_alloc+0x121/0x710 mm/slab.c:3484 vm_area_alloc+0x20/0x110 kernel/fork.c:351 mmap_region+0x964/0x1760 mm/mmap.c:1748 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+0xf7/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:0x7fc2ef79cd0a Code: b8 ff ff ff ff e9 fa fe ff ff 48 63 fb b8 03 00 00 00 0f 05 b8 ff ff ff ff e9 e6 fe ff ff 90 90 49 89 ca b8 09 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d fe c0 2a 00 31 d2 48 29 c2 64 RSP: 002b:00007ffc5558be28 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00000000007f1110 RCX: 00007fc2ef79cd0a RDX: 0000000000000003 RSI: 0000000000001000 RDI: 0000000000000000 RBP: 0000000000001000 R08: 00000000ffffffff R09: 0000000000000000 R10: 0000000000000022 R11: 0000000000000246 R12: 000000000000000a R13: 0000000000000000 R14: 0000000000000000 R15: 00007ffc5558c3c0 Allocated by task 26894: 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_port net/netfilter/ipset/ip_set_bitmap_port.c:234 [inline] bitmap_port_create+0x3dc/0x7c0 net/netfilter/ipset/ip_set_bitmap_port.c:276 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+0x59e/0x7e0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:672 ____sys_sendmsg+0x753/0x880 net/socket.c:2343 ___sys_sendmsg+0x100/0x170 net/socket.c:2397 __sys_sendmsg+0x105/0x1d0 net/socket.c:2430 __do_sys_sendmsg net/socket.c:2439 [inline] __se_sys_sendmsg net/socket.c:2437 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2437 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 16: 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 apparmor_sk_free_security+0x155/0x1d0 security/apparmor/lsm.c:795 security_sk_free+0x41/0x80 security/security.c:2074 sk_prot_free net/core/sock.c:1636 [inline] __sk_destruct+0x4cd/0x7f0 net/core/sock.c:1724 sk_destruct+0xd5/0x110 net/core/sock.c:1739 __sk_free+0xfb/0x3f0 net/core/sock.c:1750 sk_free+0x83/0xb0 net/core/sock.c:1761 deferred_put_nlk_sk+0x163/0x300 net/netlink/af_netlink.c:729 __rcu_reclaim kernel/rcu/rcu.h:222 [inline] rcu_do_batch kernel/rcu/tree.c:2183 [inline] rcu_core+0x570/0x1540 kernel/rcu/tree.c:2408 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2417 __do_softirq+0x262/0x98c kernel/softirq.c:292 The buggy address belongs to the object at ffff888097b72340 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff888097b72340, ffff888097b72360) The buggy address belongs to the page: page:ffffea00025edc80 refcount:1 mapcount:0 mapping:ffff8880aa4001c0 index:0xffff888097b72fc1 raw: 00fffe0000000200 ffffea0002a11908 ffffea0001b9fd88 ffff8880aa4001c0 raw: ffff888097b72fc1 ffff888097b72000 0000000100000026 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888097b72200: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff888097b72280: fb fb fb fb fc fc fc fc 00 00 fc fc fc fc fc fc >ffff888097b72300: fb fb fb fb fc fc fc fc 04 fc fc fc fc fc fc fc ^ ffff888097b72380: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff888097b72400: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================