================================================================== 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 ffff88809a0e6640 by task syz-executor663/10719 CPU: 0 PID: 10719 Comm: syz-executor663 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:do_nanosleep+0x0/0x640 kernel/time/hrtimer.c:1866 Code: c7 43 10 02 04 00 00 4c 89 e7 e8 8b f1 ff ff 5b 41 5c 5d c3 e8 91 b1 de f9 eb b5 e8 8a b1 de f9 eb dd cc cc cc cc cc cc cc cc <55> 48 89 e5 41 57 41 56 41 55 41 89 f5 41 54 49 bc 00 00 00 00 00 RSP: 0018:ffffc90001fd7d70 EFLAGS: 00000293 ORIG_RAX: ffffffffffffff13 RAX: 0000000000100590 RBX: 000000000000c350 RCX: ffffffff816566c4 RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffffc90001fd7dc0 RBP: ffffc90001fd7e78 R08: ffff8880a24fe2c0 R09: ffffc90001fd7dc0 R10: fffff520003fafbf R11: ffffc90001fd7dff R12: 0000000000100590 R13: 0000000000000001 R14: ffffc90001fd7e50 R15: ffffc90001fd7dc0 __do_sys_nanosleep kernel/time/hrtimer.c:1961 [inline] __se_sys_nanosleep kernel/time/hrtimer.c:1948 [inline] __x64_sys_nanosleep+0x1a6/0x220 kernel/time/hrtimer.c:1948 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x46bf80 Code: 05 48 3d 01 f0 ff ff 0f 83 dd 5d f9 ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 83 3d 11 6c 26 00 00 75 14 b8 23 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 b4 5d f9 ff c3 48 83 ec 08 e8 6a 7e fd ff RSP: 002b:00007ffce47b4a18 EFLAGS: 00000246 ORIG_RAX: 0000000000000023 RAX: ffffffffffffffda RBX: 0000000000002b1f RCX: 000000000046bf80 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00007ffce47b4a20 RBP: 0000000000018275 R08: 0000000000000000 R09: 00000000025d2880 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004021c0 R13: 0000000000402250 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 10720: 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+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 __do_sys_sendmsg net/socket.c:2426 [inline] __se_sys_sendmsg net/socket.c:2424 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2424 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 10492: 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 tomoyo_add_entry security/tomoyo/common.c:2045 [inline] tomoyo_supervisor+0xc2c/0xef0 security/tomoyo/common.c:2103 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline] tomoyo_env_perm+0x18e/0x210 security/tomoyo/environ.c:63 tomoyo_environ security/tomoyo/domain.c:674 [inline] tomoyo_find_next_domain+0x1354/0x1f6c security/tomoyo/domain.c:881 tomoyo_bprm_check_security security/tomoyo/tomoyo.c:107 [inline] tomoyo_bprm_check_security+0x124/0x1a0 security/tomoyo/tomoyo.c:97 security_bprm_check+0x63/0xb0 security/security.c:784 search_binary_handler+0x71/0x570 fs/exec.c:1645 exec_binprm fs/exec.c:1701 [inline] __do_execve_file.isra.0+0x1329/0x22b0 fs/exec.c:1821 do_execveat_common fs/exec.c:1867 [inline] do_execve fs/exec.c:1884 [inline] __do_sys_execve fs/exec.c:1960 [inline] __se_sys_execve fs/exec.c:1955 [inline] __x64_sys_execve+0x8f/0xc0 fs/exec.c:1955 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 ffff88809a0e6640 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff88809a0e6640, ffff88809a0e6660) The buggy address belongs to the page: page:ffffea0002683980 refcount:1 mapcount:0 mapping:ffff8880aa4001c0 index:0xffff88809a0e6fc1 raw: 00fffe0000000200 ffffea000285a908 ffffea00028c9308 ffff8880aa4001c0 raw: ffff88809a0e6fc1 ffff88809a0e6000 0000000100000030 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809a0e6500: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff88809a0e6580: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff88809a0e6600: fb fb fb fb fc fc fc fc 04 fc fc fc fc fc fc fc ^ ffff88809a0e6680: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff88809a0e6700: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================