================================================================== 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 ffff8880a2e2d340 by task udevd/4324 CPU: 0 PID: 4324 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:__sanitizer_cov_trace_pc+0x0/0x50 kernel/kcov.c:180 Code: ff cc cc cc cc cc cc cc cc cc 65 48 8b 04 25 c0 1e 02 00 48 8b 80 98 13 00 00 c3 0f 1f 44 00 00 66 2e 0f 1f 84 00 00 00 00 00 <55> 48 89 e5 65 48 8b 04 25 c0 1e 02 00 65 8b 15 a4 1e 8d 7e 81 e2 RSP: 0018:ffffc90004617898 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: ffffffff889024e8 RCX: ffffffff87d6464f RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001 RBP: ffffc90004617978 R08: ffff888092cfa240 R09: ffffed100d093830 R10: ffffed100d09382f R11: ffff88806849c179 R12: ffffffff889024e8 R13: ffff88806849c17b R14: 0000000000000000 R15: ffffc90004617950 add_uevent_var+0x14d/0x310 lib/kobject_uevent.c:664 dev_uevent+0x3d2/0x580 drivers/base/core.c:1432 kobject_uevent_env+0x4b6/0x1200 lib/kobject_uevent.c:556 kobject_synth_uevent+0x77b/0x89c lib/kobject_uevent.c:208 uevent_store+0x25/0x60 drivers/base/core.c:1538 dev_attr_store+0x57/0x80 drivers/base/core.c:1241 sysfs_kf_write+0x116/0x170 fs/sysfs/file.c:138 kernfs_fop_write+0x270/0x4a0 fs/kernfs/file.c:315 __vfs_write+0x8a/0x110 fs/read_write.c:494 vfs_write+0x268/0x5d0 fs/read_write.c:558 ksys_write+0x14f/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:0x7fa2f0e87370 Code: 73 01 c3 48 8b 0d c8 4a 2b 00 31 d2 48 29 c2 64 89 11 48 83 c8 ff eb ea 90 90 83 3d 85 a2 2b 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 0e 8a 01 00 48 89 04 24 RSP: 002b:00007ffe21b4cc18 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00000000009cc4a0 RCX: 00007fa2f0e87370 RDX: 0000000000000006 RSI: 000000000041f4f9 RDI: 000000000000000b RBP: 00000000009cc0c0 R08: 000000000041f4f1 R09: 00007fa2f0edd7d0 R10: 7269762f73656369 R11: 0000000000000246 R12: 000000000000000b R13: 0000000000000000 R14: 00000000009cc4a0 R15: 00000000009b3250 Allocated by task 30800: 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 30384: 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_path_perm+0x24e/0x430 security/tomoyo/file.c:842 tomoyo_inode_getattr+0x1d/0x30 security/tomoyo/tomoyo.c:129 security_inode_getattr+0xf2/0x150 security/security.c:1222 vfs_getattr+0x25/0x70 fs/stat.c:115 vfs_statx+0x157/0x200 fs/stat.c:191 vfs_stat include/linux/fs.h:3249 [inline] __do_sys_newstat+0xa4/0x130 fs/stat.c:341 __se_sys_newstat fs/stat.c:337 [inline] __x64_sys_newstat+0x54/0x80 fs/stat.c:337 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 ffff8880a2e2d340 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880a2e2d340, ffff8880a2e2d360) The buggy address belongs to the page: page:ffffea00028b8b40 refcount:1 mapcount:0 mapping:ffff8880aa4001c0 index:0xffff8880a2e2dfc1 raw: 00fffe0000000200 ffffea00029a2548 ffffea000276c188 ffff8880aa4001c0 raw: ffff8880a2e2dfc1 ffff8880a2e2d000 000000010000003c 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a2e2d200: 00 03 fc fc fc fc fc fc 00 04 fc fc fc fc fc fc ffff8880a2e2d280: 00 00 00 fc fc fc fc fc 00 00 04 fc fc fc fc fc >ffff8880a2e2d300: 00 06 fc fc fc fc fc fc 04 fc fc fc fc fc fc fc ^ ffff8880a2e2d380: 00 00 00 fc fc fc fc fc 00 03 fc fc fc fc fc fc ffff8880a2e2d400: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc ==================================================================