================================================================== BUG: KASAN: slab-out-of-bounds in instrument_atomic_read include/linux/instrumented.h:68 [inline] BUG: KASAN: slab-out-of-bounds in _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] BUG: KASAN: slab-out-of-bounds in bitmap_ip_do_add net/netfilter/ipset/ip_set_bitmap_ip.c:83 [inline] BUG: KASAN: slab-out-of-bounds in bitmap_ip_add+0xdf/0x8d0 net/netfilter/ipset/ip_set_bitmap_gen.h:136 Read of size 8 at addr ffff888043265708 by task syz.0.0/5322 CPU: 0 UID: 0 PID: 5322 Comm: syz.0.0 Not tainted 6.12.0-rc6-syzkaller-00169-g906bd684e4b1 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189 instrument_atomic_read include/linux/instrumented.h:68 [inline] _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] bitmap_ip_do_add net/netfilter/ipset/ip_set_bitmap_ip.c:83 [inline] bitmap_ip_add+0xdf/0x8d0 net/netfilter/ipset/ip_set_bitmap_gen.h:136 bitmap_ip_uadt+0x78a/0xbb0 net/netfilter/ipset/ip_set_bitmap_ip.c:186 call_ad+0x279/0xa70 net/netfilter/ipset/ip_set_core.c:1746 ip_set_ad+0x7e0/0x990 net/netfilter/ipset/ip_set_core.c:1836 nfnetlink_rcv_msg+0xbec/0x1180 net/netfilter/nfnetlink.c:302 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2551 nfnetlink_rcv+0x297/0x2ab0 net/netfilter/nfnetlink.c:667 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline] netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1357 netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:729 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:744 ____sys_sendmsg+0x52a/0x7e0 net/socket.c:2607 ___sys_sendmsg net/socket.c:2661 [inline] __sys_sendmsg+0x292/0x380 net/socket.c:2690 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fcf23b7e719 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fcf24a37038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fcf23d35f80 RCX: 00007fcf23b7e719 RDX: 0000000004000050 RSI: 0000000020000000 RDI: 0000000000000004 RBP: 00007fcf23bf139e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fcf23d35f80 R15: 00007fff06c2e658 Allocated by task 5322: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:257 [inline] __do_kmalloc_node mm/slub.c:4264 [inline] __kmalloc_noprof+0x1fc/0x400 mm/slub.c:4276 init_map_ip net/netfilter/ipset/ip_set_bitmap_ip.c:223 [inline] bitmap_ip_create+0x565/0xc00 net/netfilter/ipset/ip_set_bitmap_ip.c:327 ip_set_create+0xa5c/0x1900 net/netfilter/ipset/ip_set_core.c:1104 nfnetlink_rcv_msg+0xbec/0x1180 net/netfilter/nfnetlink.c:302 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2551 nfnetlink_rcv+0x297/0x2ab0 net/netfilter/nfnetlink.c:667 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline] netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1357 netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:729 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:744 ____sys_sendmsg+0x52a/0x7e0 net/socket.c:2607 ___sys_sendmsg net/socket.c:2661 [inline] __sys_sendmsg+0x292/0x380 net/socket.c:2690 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888043265700 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 0 bytes to the right of allocated 8-byte region [ffff888043265700, ffff888043265708) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x43265 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000000 ffff88801ac41500 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080800080 00000001f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5306, tgid 5306 (syz-executor), ts 57375213708, free_ts 57373154371 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1545 [inline] get_page_from_freelist+0x303f/0x3190 mm/page_alloc.c:3457 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4733 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 alloc_slab_page+0x6a/0x140 mm/slub.c:2412 allocate_slab+0x5a/0x2f0 mm/slub.c:2578 new_slab mm/slub.c:2631 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3818 __slab_alloc+0x58/0xa0 mm/slub.c:3908 __slab_alloc_node mm/slub.c:3961 [inline] slab_alloc_node mm/slub.c:4122 [inline] __do_kmalloc_node mm/slub.c:4263 [inline] __kmalloc_noprof+0x25a/0x400 mm/slub.c:4276 kmalloc_noprof include/linux/slab.h:882 [inline] kzalloc_noprof include/linux/slab.h:1014 [inline] xt_jumpstack_alloc net/netfilter/x_tables.c:1335 [inline] xt_replace_table+0x91/0x780 net/netfilter/x_tables.c:1394 xt_register_table+0x293/0x750 net/netfilter/x_tables.c:1480 ip6t_register_table+0x16b/0x7b0 net/ipv6/netfilter/ip6_tables.c:1757 ip6table_mangle_table_init+0x42/0x70 net/ipv6/netfilter/ip6table_mangle.c:85 xt_find_table_lock+0x322/0x400 net/netfilter/x_tables.c:1260 xt_request_find_table_lock+0x26/0x100 net/netfilter/x_tables.c:1285 get_info net/ipv6/netfilter/ip6_tables.c:979 [inline] do_ip6t_get_ctl+0x89e/0x1820 net/ipv6/netfilter/ip6_tables.c:1668 page last free pid 16 tgid 16 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1108 [inline] free_unref_page+0xcfb/0xf20 mm/page_alloc.c:2638 rcu_do_batch kernel/rcu/tree.c:2567 [inline] rcu_core+0xaaa/0x17a0 kernel/rcu/tree.c:2823 handle_softirqs+0x2c5/0x980 kernel/softirq.c:554 run_ksoftirqd+0xca/0x130 kernel/softirq.c:927 smpboot_thread_fn+0x544/0xa30 kernel/smpboot.c:164 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff888043265600: 00 fc fc fc 00 fc fc fc 00 fc fc fc 00 fc fc fc ffff888043265680: 00 fc fc fc 00 fc fc fc 00 fc fc fc 00 fc fc fc >ffff888043265700: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888043265780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888043265800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================