================================================================== 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_gc_test net/netfilter/ipset/ip_set_bitmap_ip.c:76 [inline] BUG: KASAN: slab-out-of-bounds in bitmap_ip_gc+0x100/0x4f0 net/netfilter/ipset/ip_set_bitmap_gen.h:277 Read of size 8 at addr ffff8880a6d750c0 by task syz-executor.4/11242 CPU: 1 PID: 11242 Comm: syz-executor.4 Not tainted 5.5.0-rc6-next-20200116-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/0x32 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:641 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_gc_test net/netfilter/ipset/ip_set_bitmap_ip.c:76 [inline] bitmap_ip_gc+0x100/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:arch_local_irq_restore arch/x86/include/asm/paravirt.h:752 [inline] RIP: 0010:qlink_free mm/kasan/quarantine.c:151 [inline] RIP: 0010:qlist_free_all+0x10c/0x150 mm/kasan/quarantine.c:167 Code: 50 08 48 8d 4a ff 83 e2 01 48 0f 45 c1 4c 8b 78 18 e9 37 ff ff ff e8 13 03 c7 ff 48 83 3d 83 86 ff 07 00 74 39 48 89 df 57 9d <0f> 1f 44 00 00 4d 85 ed 75 96 49 c7 46 08 00 00 00 00 49 c7 06 00 RSP: 0018:ffffc900017e7580 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000007 RBX: 0000000000000286 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff8880513da920 RDI: 0000000000000286 RBP: ffffc900017e75b0 R08: ffff8880513da080 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffff888097b01120 R14: ffffc900017e75c0 R15: ffff8880aa412e00 quarantine_reduce+0x15e/0x1a0 mm/kasan/quarantine.c:260 __kasan_kmalloc.constprop.0+0xa3/0xe0 mm/kasan/common.c:496 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:523 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slab.c:3263 [inline] kmem_cache_alloc_node_trace+0x143/0x750 mm/slab.c:3593 __do_kmalloc_node mm/slab.c:3615 [inline] __kmalloc_node_track_caller+0x3d/0x70 mm/slab.c:3630 __kmalloc_reserve.isra.0+0x40/0xf0 net/core/skbuff.c:142 __alloc_skb+0x10b/0x5e0 net/core/skbuff.c:210 alloc_skb include/linux/skbuff.h:1049 [inline] alloc_skb_with_frags+0x93/0x590 net/core/skbuff.c:5675 sock_alloc_send_pskb+0x7ad/0x920 net/core/sock.c:2242 unix_stream_sendmsg+0x711/0xb60 net/unix/af_unix.c:1871 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:672 sock_write_iter+0x2cb/0x400 net/socket.c:1004 call_write_iter include/linux/fs.h:1901 [inline] new_sync_write+0x4d3/0x770 fs/read_write.c:483 __vfs_write+0xe1/0x110 fs/read_write.c:496 vfs_write+0x268/0x5d0 fs/read_write.c:558 ksys_write+0x220/0x290 fs/read_write.c:611 __do_sys_write fs/read_write.c:623 [inline] __se_sys_write fs/read_write.c:620 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:620 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45b399 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fdcf018dc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fdcf018e6d4 RCX: 000000000045b399 RDX: 000000007fffffff RSI: 00000000200000c0 RDI: 0000000000000004 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000ca7 R14: 00000000004cd856 R15: 000000000075bf2c Allocated by task 11167: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:515 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:488 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:529 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc+0x163/0x770 mm/slab.c:3665 kmalloc include/linux/slab.h:560 [inline] kzalloc include/linux/slab.h:669 [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+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 9843: 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:337 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:476 kasan_slab_free+0xe/0x10 mm/kasan/common.c:485 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x2c0 mm/slab.c:3757 kvfree+0x4a/0x60 mm/util.c:603 xt_free_table_info+0x11e/0x180 net/netfilter/x_tables.c:1193 __do_replace+0x701/0x950 net/ipv6/netfilter/ip6_tables.c:1104 do_replace net/ipv6/netfilter/ip6_tables.c:1157 [inline] do_ip6t_set_ctl+0x33a/0x4c8 net/ipv6/netfilter/ip6_tables.c:1681 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x77/0xd0 net/netfilter/nf_sockopt.c:115 ipv6_setsockopt net/ipv6/ipv6_sockglue.c:949 [inline] ipv6_setsockopt+0x147/0x180 net/ipv6/ipv6_sockglue.c:933 tcp_setsockopt net/ipv4/tcp.c:3158 [inline] tcp_setsockopt+0x8f/0xe0 net/ipv4/tcp.c:3152 sock_common_setsockopt+0x94/0xd0 net/core/sock.c:3149 __sys_setsockopt+0x261/0x4c0 net/socket.c:2130 __do_sys_setsockopt net/socket.c:2146 [inline] __se_sys_setsockopt net/socket.c:2143 [inline] __x64_sys_setsockopt+0xbe/0x150 net/socket.c:2143 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 ffff8880a6d750c0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880a6d750c0, ffff8880a6d750e0) The buggy address belongs to the page: page:ffffea00029b5d40 refcount:1 mapcount:0 mapping:ffff8880aa4001c0 index:0xffff8880a6d75fc1 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea000258b208 ffffea00028dd148 ffff8880aa4001c0 raw: ffff8880a6d75fc1 ffff8880a6d75000 0000000100000038 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a6d74f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a6d75000: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff8880a6d75080: fb fb fb fb fc fc fc fc 04 fc fc fc fc fc fc fc ^ ffff8880a6d75100: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880a6d75180: 00 03 fc fc fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================