================================================================== 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_ipmac_gc_test net/netfilter/ipset/ip_set_bitmap_ipmac.c:102 [inline] BUG: KASAN: slab-out-of-bounds in bitmap_ipmac_gc+0x119/0x590 net/netfilter/ipset/ip_set_bitmap_gen.h:277 Read of size 8 at addr ffff8880968e41c0 by task udevd/9613 CPU: 0 PID: 9613 Comm: udevd 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_ipmac_gc_test net/netfilter/ipset/ip_set_bitmap_ipmac.c:102 [inline] bitmap_ipmac_gc+0x119/0x590 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:vfs_getattr_nosec+0xcd/0x290 fs/stat.c:77 Code: 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 ae 01 00 00 48 ba 00 00 00 00 00 fc ff df 49 8b 5d 28 <48> 8d 7b 50 48 89 f9 48 c1 e9 03 80 3c 11 00 0f 85 81 01 00 00 48 RSP: 0018:ffffc90001ec7c80 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: dffffc0000000000 RBX: ffff888096ab8000 RCX: 0000000000000000 RDX: dffffc0000000000 RSI: 0000000000000000 RDI: ffff888091eaea28 RBP: ffffc90001ec7cb8 R08: fffff520003d8fce R09: ffffc90001ec7de8 R10: fffff520003d8fcd R11: ffffc90001ec7e6f R12: ffffc90001ec7de8 R13: ffff888091eaea00 R14: ffffc90001ec7d40 R15: 0000000000000900 vfs_getattr+0x4b/0x70 fs/stat.c:120 vfs_statx+0x15d/0x200 fs/stat.c:201 vfs_lstat include/linux/fs.h:3260 [inline] __do_sys_newlstat+0xa4/0x130 fs/stat.c:364 __se_sys_newlstat fs/stat.c:358 [inline] __x64_sys_newlstat+0x54/0x80 fs/stat.c:358 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fd3718a8d05 Code: f7 d8 64 89 02 83 c8 ff c3 90 90 90 90 90 90 90 90 90 90 90 90 83 ff 01 48 89 f0 77 18 48 89 c7 48 89 d6 b8 06 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 17 f3 c3 90 48 8b 05 01 51 2b 00 64 c7 00 16 RSP: 002b:00007ffd772065c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000006 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fd3718a8d05 RDX: 00007ffd772065e0 RSI: 00007ffd772065e0 RDI: 00007ffd77206670 RBP: 0000000001983744 R08: 0000000001983744 R09: 00007fd3718fec20 R10: 7269762f73656369 R11: 0000000000000246 R12: 0000000001981e80 R13: 0000000001981f70 R14: 0000000001969250 R15: 000000000196ee10 Allocated by task 9929: 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_ipmac net/netfilter/ipset/ip_set_bitmap_ipmac.c:302 [inline] bitmap_ipmac_create+0x4e8/0xa00 net/netfilter/ipset/ip_set_bitmap_ipmac.c:365 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 9650: 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 kobject_rename+0x192/0x290 lib/kobject.c:542 device_rename+0x14b/0x200 drivers/base/core.c:3345 dev_change_name+0x395/0x930 net/core/dev.c:1248 do_setlink+0x2d28/0x3720 net/core/rtnetlink.c:2576 __rtnl_newlink+0xbef/0x1790 net/core/rtnetlink.c:3243 rtnl_newlink+0x69/0xa0 net/core/rtnetlink.c:3368 rtnetlink_rcv_msg+0x45e/0xaf0 net/core/rtnetlink.c:5429 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5447 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_sendto+0x262/0x380 net/socket.c:1998 __do_sys_sendto net/socket.c:2010 [inline] __se_sys_sendto net/socket.c:2006 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:2006 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 ffff8880968e41c0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880968e41c0, ffff8880968e41e0) The buggy address belongs to the page: page:ffffea00025a3900 refcount:1 mapcount:0 mapping:ffff8880aa4001c0 index:0xffff8880968e4fc1 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00028f54c8 ffffea0002a14588 ffff8880aa4001c0 raw: ffff8880968e4fc1 ffff8880968e4000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880968e4080: 00 03 fc fc fc fc fc fc 00 01 fc fc fc fc fc fc ffff8880968e4100: 00 03 fc fc fc fc fc fc 00 03 fc fc fc fc fc fc >ffff8880968e4180: 00 03 fc fc fc fc fc fc 04 fc fc fc fc fc fc fc ^ ffff8880968e4200: 00 03 fc fc fc fc fc fc 00 00 06 fc fc fc fc fc ffff8880968e4280: 05 fc fc fc fc fc fc fc 05 fc fc fc fc fc fc fc ==================================================================