================================================================== BUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:101 [inline] BUG: KASAN: use-after-free in atomic_dec include/linux/atomic/atomic-instrumented.h:244 [inline] BUG: KASAN: use-after-free in gfs2_qd_dispose fs/gfs2/quota.c:137 [inline] BUG: KASAN: use-after-free in gfs2_qd_shrink_scan+0x63d/0x860 fs/gfs2/quota.c:175 Write of size 4 at addr ffff88801ec58a70 by task syz.3.5292/16912 CPU: 0 PID: 16912 Comm: syz.3.5292 Not tainted 5.15.167-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description+0x63/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x16b/0x1c0 mm/kasan/report.c:451 kasan_check_range+0x27e/0x290 mm/kasan/generic.c:189 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic_dec include/linux/atomic/atomic-instrumented.h:244 [inline] gfs2_qd_dispose fs/gfs2/quota.c:137 [inline] gfs2_qd_shrink_scan+0x63d/0x860 fs/gfs2/quota.c:175 do_shrink_slab+0x542/0xda0 mm/vmscan.c:758 shrink_slab+0x233/0x960 mm/vmscan.c:918 drop_slab_node+0xed/0x180 mm/vmscan.c:953 drop_slab+0x8b/0x120 mm/vmscan.c:963 drop_caches_sysctl_handler+0xb3/0x160 fs/drop_caches.c:66 proc_sys_call_handler+0x541/0x8a0 fs/proc/proc_sysctl.c:585 do_iter_readv_writev+0x594/0x7a0 do_iter_write+0x1e6/0x760 fs/read_write.c:855 vfs_writev fs/read_write.c:928 [inline] do_writev+0x281/0x470 fs/read_write.c:971 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f1d5dd42ef9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f1d5c1bb038 EFLAGS: 00000246 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 00007f1d5defaf80 RCX: 00007f1d5dd42ef9 RDX: 0000000000000001 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00007f1d5ddb5b76 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1d5defaf80 R15: 00007ffddcbcad78 Allocated by task 16685: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc+0xba/0xf0 mm/kasan/common.c:513 kasan_kmalloc include/linux/kasan.h:264 [inline] kmem_cache_alloc_trace+0x143/0x290 mm/slub.c:3247 kmalloc include/linux/slab.h:591 [inline] kzalloc include/linux/slab.h:721 [inline] init_sbd fs/gfs2/ops_fstype.c:77 [inline] gfs2_fill_super+0x15a/0x2750 fs/gfs2/ops_fstype.c:1151 get_tree_bdev+0x3fe/0x620 fs/super.c:1323 gfs2_get_tree+0x50/0x210 fs/gfs2/ops_fstype.c:1332 vfs_get_tree+0x88/0x270 fs/super.c:1528 do_new_mount+0x2ba/0xb40 fs/namespace.c:3005 do_mount fs/namespace.c:3348 [inline] __do_sys_mount fs/namespace.c:3556 [inline] __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3533 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 3573: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x80 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd8/0x120 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1705 [inline] slab_free_freelist_hook+0xdd/0x160 mm/slub.c:1731 slab_free mm/slub.c:3499 [inline] kfree+0xf1/0x270 mm/slub.c:4559 generic_shutdown_super+0x136/0x2c0 fs/super.c:475 kill_block_super+0x7a/0xe0 fs/super.c:1425 deactivate_locked_super+0xa0/0x110 fs/super.c:335 cleanup_mnt+0x44e/0x500 fs/namespace.c:1143 task_work_run+0x129/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x5d/0x240 kernel/entry/common.c:307 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Last potentially related work creation: kasan_save_stack+0x36/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:3007 [inline] call_rcu+0x1c4/0xa70 kernel/rcu/tree.c:3087 generic_shutdown_super+0x136/0x2c0 fs/super.c:475 kill_block_super+0x7a/0xe0 fs/super.c:1425 deactivate_locked_super+0xa0/0x110 fs/super.c:335 cleanup_mnt+0x44e/0x500 fs/namespace.c:1143 task_work_run+0x129/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x5d/0x240 kernel/entry/common.c:307 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Second to last potentially related work creation: kasan_save_stack+0x36/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:3007 [inline] call_rcu+0x1c4/0xa70 kernel/rcu/tree.c:3087 generic_shutdown_super+0x136/0x2c0 fs/super.c:475 kill_block_super+0x7a/0xe0 fs/super.c:1425 deactivate_locked_super+0xa0/0x110 fs/super.c:335 cleanup_mnt+0x44e/0x500 fs/namespace.c:1143 task_work_run+0x129/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x5d/0x240 kernel/entry/common.c:307 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff88801ec58000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 2672 bytes inside of 8192-byte region [ffff88801ec58000, ffff88801ec5a000) The buggy address belongs to the page: page:ffffea00007b1600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1ec58 head:ffffea00007b1600 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 0000000100000001 ffff888017042280 raw: 0000000000000000 0000000000020002 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, ts 7448036273, free_ts 0 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159 __alloc_pages+0x272/0x700 mm/page_alloc.c:5423 alloc_page_interleave+0x22/0x1c0 mm/mempolicy.c:2031 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xbb/0x4b0 mm/slub.c:1975 ___slab_alloc+0x6f6/0xe10 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] slab_alloc mm/slub.c:3228 [inline] __kmalloc+0x1c9/0x300 mm/slub.c:4403 acpi_ut_initialize_buffer+0x1cd/0x2b0 acpi_rs_create_pci_routing_table+0x112/0xa40 drivers/acpi/acpica/rscreate.c:212 acpi_rs_get_prt_method_data+0xe4/0x140 drivers/acpi/acpica/rsutils.c:456 acpi_pci_irq_find_prt_entry+0x16a/0xde0 drivers/acpi/pci_irq.c:214 acpi_pci_irq_lookup+0xac/0x7a0 drivers/acpi/pci_irq.c:298 acpi_pci_irq_enable+0x229/0x970 drivers/acpi/pci_irq.c:411 do_pci_enable_device+0x2d7/0x5a0 drivers/pci/pci.c:1851 pci_enable_device_flags+0x6a2/0x8f0 drivers/pci/pci.c:1936 virtio_pci_probe+0x15a/0x2e0 drivers/virtio/virtio_pci_common.c:532 local_pci_probe drivers/pci/pci-driver.c:323 [inline] pci_call_probe drivers/pci/pci-driver.c:380 [inline] __pci_device_probe drivers/pci/pci-driver.c:405 [inline] pci_device_probe+0x679/0xa10 drivers/pci/pci-driver.c:448 page_owner free stack trace missing Memory state around the buggy address: ffff88801ec58900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801ec58980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88801ec58a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801ec58a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801ec58b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================