================================================================== 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 ffff88809d27c680 by task syz-executor.3/17201 CPU: 1 PID: 17201 Comm: syz-executor.3 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:vma_gap_callbacks_compute_max mm/mmap.c:433 [inline] RIP: 0010:vma_gap_callbacks_propagate mm/mmap.c:433 [inline] RIP: 0010:vma_gap_update mm/mmap.c:448 [inline] RIP: 0010:__vma_link_rb+0x53f/0x770 mm/mmap.c:610 Code: 4c 0f 42 e0 e8 d2 de cf ff 48 8d 7b 08 48 89 f8 48 c1 e8 03 42 80 3c 28 00 0f 85 f0 00 00 00 48 8b 43 08 48 85 c0 48 89 45 d0 <74> 2a e8 aa de cf ff 48 8b 45 d0 48 8d 78 18 48 89 fa 48 c1 ea 03 RSP: 0018:ffffc900016079d8 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: ffff8880a86fb270 RBX: ffff88805adb5bb8 RCX: ffffffff81a5208e RDX: 0000000000000000 RSI: ffffffff81a520fe RDI: ffff88805adb5bc0 RBP: ffffc90001607a28 R08: ffff888093fc84c0 R09: ffffed101270732e R10: ffffed101270732d R11: ffff88809383996f R12: 0000000000000000 R13: dffffc0000000000 R14: ffff88809fa14c80 R15: 0000000000000000 dup_mmap kernel/fork.c:598 [inline] dup_mm+0x86c/0x1430 kernel/fork.c:1360 copy_mm kernel/fork.c:1416 [inline] copy_process+0x2ad6/0x7230 kernel/fork.c:2072 _do_fork+0x146/0x1090 kernel/fork.c:2421 __do_sys_clone kernel/fork.c:2576 [inline] __se_sys_clone kernel/fork.c:2557 [inline] __x64_sys_clone+0x19a/0x260 kernel/fork.c:2557 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45991a Code: f7 d8 64 89 04 25 d4 02 00 00 64 4c 8b 0c 25 10 00 00 00 31 d2 4d 8d 91 d0 02 00 00 31 f6 bf 11 00 20 01 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 f5 00 00 00 85 c0 41 89 c5 0f 85 fc 00 00 RSP: 002b:00007ffdc0d80280 EFLAGS: 00000246 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 00007ffdc0d80280 RCX: 000000000045991a RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011 RBP: 00007ffdc0d802c0 R08: 0000000000000001 R09: 00000000029aa940 R10: 00000000029aac10 R11: 0000000000000246 R12: 0000000000000001 R13: 0000000000000000 R14: 0000000000000000 R15: 00007ffdc0d80310 Allocated by task 32276: 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 31735: 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 kfree_link+0x16/0x20 fs/libfs.c:1128 do_delayed_call include/linux/delayed_call.h:28 [inline] put_link fs/namei.c:875 [inline] step_into fs/namei.c:1763 [inline] walk_component+0x463/0xc90 fs/namei.c:1815 link_path_walk.part.0+0x5ab/0x1340 fs/namei.c:2124 link_path_walk fs/namei.c:2058 [inline] path_openat+0x1fe/0x3180 fs/namei.c:3472 do_filp_open+0x1a1/0x280 fs/namei.c:3503 do_sys_open+0x3fe/0x5d0 fs/open.c:1097 __do_sys_open fs/open.c:1115 [inline] __se_sys_open fs/open.c:1110 [inline] __x64_sys_open+0x7e/0xc0 fs/open.c:1110 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88809d27c680 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff88809d27c680, ffff88809d27c6a0) The buggy address belongs to the page: page:ffffea0002749f00 refcount:1 mapcount:0 mapping:ffff8880aa4001c0 index:0xffff88809d27cfc1 raw: 00fffe0000000200 ffffea00029a5388 ffffea0002993888 ffff8880aa4001c0 raw: ffff88809d27cfc1 ffff88809d27c000 0000000100000035 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809d27c580: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff88809d27c600: fb fb fb fb fc fc fc fc 07 fc fc fc fc fc fc fc >ffff88809d27c680: 04 fc fc fc fc fc fc fc 00 01 fc fc fc fc fc fc ^ ffff88809d27c700: 07 fc fc fc fc fc fc fc 00 fc fc fc fc fc fc fc ffff88809d27c780: 00 fc fc fc fc fc fc fc 00 fc fc fc fc fc fc fc ==================================================================