================================================================== BUG: KASAN: slab-out-of-bounds in ntfs_trim_fs+0x84f/0x950 fs/ntfs3/bitmap.c:1434 Read of size 2 at addr ffff88801d4e9202 by task syz-executor.3/7702 CPU: 1 PID: 7702 Comm: syz-executor.3 Not tainted 6.1.0-syzkaller-13064-g75caf5940899 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:306 [inline] print_report+0x15e/0x461 mm/kasan/report.c:417 kasan_report+0xbf/0x1f0 mm/kasan/report.c:517 ntfs_trim_fs+0x84f/0x950 fs/ntfs3/bitmap.c:1434 ntfs_ioctl_fitrim+0x23e/0x340 fs/ntfs3/file.c:40 ntfs_ioctl+0xa0/0xe0 fs/ntfs3/file.c:57 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x197/0x210 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f7f7128c0d9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f7f7202c168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f7f713abf80 RCX: 00007f7f7128c0d9 RDX: 00000000200000c0 RSI: 00000000c0185879 RDI: 0000000000000004 RBP: 00007f7f712e7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe11550d9f R14: 00007f7f7202c300 R15: 0000000000022000 Allocated by task 7702: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] ____kasan_kmalloc mm/kasan/common.c:330 [inline] __kasan_kmalloc+0xa3/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:968 [inline] __kmalloc+0x5a/0xd0 mm/slab_common.c:981 kmalloc_array include/linux/slab.h:636 [inline] kcalloc include/linux/slab.h:667 [inline] wnd_init+0x2ff/0x460 fs/ntfs3/bitmap.c:664 ntfs_fill_super+0x26b6/0x3860 fs/ntfs3/super.c:1118 get_tree_bdev+0x444/0x760 fs/super.c:1282 vfs_get_tree+0x8d/0x2f0 fs/super.c:1489 do_new_mount fs/namespace.c:3145 [inline] path_mount+0x132a/0x1e20 fs/namespace.c:3475 do_mount fs/namespace.c:3488 [inline] __do_sys_mount fs/namespace.c:3697 [inline] __se_sys_mount fs/namespace.c:3674 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3674 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88801d4e9200 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 2 bytes inside of 32-byte region [ffff88801d4e9200, ffff88801d4e9220) The buggy address belongs to the physical page: page:ffffea0000753a40 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88801d4e9fc1 pfn:0x1d4e9 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffff888012040100 ffffea00008da6d0 ffffea0000948990 raw: ffff88801d4e9fc1 ffff88801d4e9000 000000010000003f 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 0x242220(__GFP_HIGH|__GFP_ATOMIC|__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE), pid 5227, tgid 5227 (kworker/0:6), ts 309647773002, free_ts 304779542846 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x119c/0x2ce0 mm/page_alloc.c:4283 __alloc_pages_slowpath.constprop.0+0x36b/0x23d0 mm/page_alloc.c:5084 __alloc_pages+0x4aa/0x5b0 mm/page_alloc.c:5562 __alloc_pages_node include/linux/gfp.h:237 [inline] kmem_getpages mm/slab.c:1363 [inline] cache_grow_begin+0x94/0x390 mm/slab.c:2574 cache_alloc_refill+0x27f/0x380 mm/slab.c:2947 ____cache_alloc mm/slab.c:3023 [inline] ____cache_alloc mm/slab.c:3006 [inline] __do_cache_alloc mm/slab.c:3206 [inline] slab_alloc_node mm/slab.c:3254 [inline] __kmem_cache_alloc_node+0x44f/0x510 mm/slab.c:3544 kmalloc_trace+0x26/0x60 mm/slab_common.c:1062 kmalloc include/linux/slab.h:580 [inline] kzalloc include/linux/slab.h:720 [inline] ref_tracker_alloc+0x158/0x560 lib/ref_tracker.c:85 __netdev_tracker_alloc include/linux/netdevice.h:4020 [inline] netdev_hold include/linux/netdevice.h:4049 [inline] dst_init+0xe4/0x520 net/core/dst.c:52 dst_alloc+0x16f/0x1f0 net/core/dst.c:96 ip6_dst_alloc+0x32/0xa0 net/ipv6/route.c:344 icmp6_dst_alloc+0x71/0x680 net/ipv6/route.c:3261 mld_sendpack+0x5de/0xe70 net/ipv6/mcast.c:1809 mld_send_cr net/ipv6/mcast.c:2121 [inline] mld_ifc_work+0x720/0xdc0 net/ipv6/mcast.c:2653 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x669/0x1090 kernel/workqueue.c:2436 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1446 [inline] free_pcp_prepare+0x65c/0xc00 mm/page_alloc.c:1496 free_unref_page_prepare mm/page_alloc.c:3369 [inline] free_unref_page+0x1d/0x490 mm/page_alloc.c:3464 slab_destroy mm/slab.c:1619 [inline] slabs_destroy+0x85/0xc0 mm/slab.c:1639 cache_flusharray mm/slab.c:3365 [inline] ___cache_free+0x2ac/0x3d0 mm/slab.c:3428 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x4f/0x1a0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x192/0x220 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x63/0x90 mm/kasan/common.c:302 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:761 [inline] slab_alloc_node mm/slab.c:3261 [inline] __kmem_cache_alloc_node+0x26b/0x510 mm/slab.c:3544 kmalloc_trace+0x26/0x60 mm/slab_common.c:1062 kmalloc include/linux/slab.h:580 [inline] kzalloc include/linux/slab.h:720 [inline] kobject_uevent_env+0x234/0x1620 lib/kobject_uevent.c:524 __kobject_del+0x160/0x1f0 lib/kobject.c:585 kobject_cleanup lib/kobject.c:664 [inline] kobject_release lib/kobject.c:704 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x2f1/0x4d0 lib/kobject.c:721 net_rx_queue_update_kobjects+0x3f7/0x510 net/core/net-sysfs.c:1128 netif_set_real_num_rx_queues+0x165/0x210 net/core/dev.c:2934 veth_init_queues drivers/net/veth.c:1692 [inline] veth_init_queues+0x14d/0x190 drivers/net/veth.c:1682 veth_newlink+0x687/0x9a0 drivers/net/veth.c:1813 Memory state around the buggy address: ffff88801d4e9100: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc ffff88801d4e9180: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc >ffff88801d4e9200: 02 fc fc fc fc fc fc fc 00 00 00 00 fc fc fc fc ^ ffff88801d4e9280: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc ffff88801d4e9300: 00 00 fc fc fc fc fc fc 00 00 00 00 fc fc fc fc ==================================================================