Hello,
syzbot found the following issue on:
HEAD commit: c63962be84ef Linux 6.1.124
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=14656bc4580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=2f99ac2134f3ff64
dashboard link:
https://syzkaller.appspot.com/bug?extid=a14aec508f735d7e36eb
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/7ce6b92b931c/disk-c63962be.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/edbb3cdca2c4/vmlinux-c63962be.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/728732ee05ab/Image-c63962be.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+a14aec...@syzkaller.appspotmail.com
ocfs2: Mounting device (7,7) on (node local, slot 0) with ordered data mode.
==================================================================
BUG: KASAN: use-after-free in ocfs2_lock_global_qf fs/ocfs2/quota_global.c:303 [inline]
BUG: KASAN: use-after-free in ocfs2_get_next_id+0x250/0x944 fs/ocfs2/quota_global.c:888
Read of size 8 at addr ffff00011020c028 by task syz.7.502/10186
CPU: 0 PID: 10186 Comm: syz.7.502 Not tainted 6.1.124-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call trace:
dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:316 [inline]
print_report+0x174/0x4c0 mm/kasan/report.c:427
kasan_report+0xd4/0x130 mm/kasan/report.c:531
__asan_report_load8_noabort+0x2c/0x38 mm/kasan/report_generic.c:351
ocfs2_lock_global_qf fs/ocfs2/quota_global.c:303 [inline]
ocfs2_get_next_id+0x250/0x944 fs/ocfs2/quota_global.c:888
dquot_get_next_dqblk+0x7c/0x348 fs/quota/dquot.c:2717
quota_getnextquota+0x264/0x650 fs/quota/quota.c:250
do_quotactl+0x52c/0x698 fs/quota/quota.c:800
__do_sys_quotactl fs/quota/quota.c:960 [inline]
__se_sys_quotactl fs/quota/quota.c:916 [inline]
__arm64_sys_quotactl+0x2d8/0x7a0 fs/quota/quota.c:916
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
Allocated by task 10186:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4c/0x80 mm/kasan/common.c:52
kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505
____kasan_kmalloc mm/kasan/common.c:374 [inline]
__kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:383
kasan_kmalloc include/linux/kasan.h:211 [inline]
kmalloc_trace+0x7c/0x94 mm/slab_common.c:1031
kmalloc include/linux/slab.h:563 [inline]
ocfs2_local_read_info+0x1b8/0x15bc fs/ocfs2/quota_local.c:696
dquot_load_quota_sb+0x6f0/0xb1c fs/quota/dquot.c:2470
dquot_load_quota_inode+0x280/0x4f4 fs/quota/dquot.c:2507
ocfs2_enable_quotas+0x1d4/0x3cc fs/ocfs2/super.c:926
ocfs2_fill_super+0x3aa4/0x48c4 fs/ocfs2/super.c:1139
mount_bdev+0x274/0x370 fs/super.c:1443
ocfs2_mount+0x44/0x58 fs/ocfs2/super.c:1186
legacy_get_tree+0xd4/0x16c fs/fs_context.c:632
vfs_get_tree+0x90/0x274 fs/super.c:1573
do_new_mount+0x278/0x8fc fs/namespace.c:3056
path_mount+0x590/0xe5c fs/namespace.c:3386
do_mount fs/namespace.c:3399 [inline]
__do_sys_mount fs/namespace.c:3607 [inline]
__se_sys_mount fs/namespace.c:3584 [inline]
__arm64_sys_mount+0x45c/0x594 fs/namespace.c:3584
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
Freed by task 10186:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4c/0x80 mm/kasan/common.c:52
kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:516
____kasan_slab_free+0x144/0x1c0 mm/kasan/common.c:236
__kasan_slab_free+0x18/0x28 mm/kasan/common.c:244
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1724 [inline]
slab_free_freelist_hook mm/slub.c:1750 [inline]
slab_free mm/slub.c:3661 [inline]
__kmem_cache_free+0x2c0/0x4b4 mm/slub.c:3674
kfree+0xcc/0x1b8 mm/slab_common.c:988
ocfs2_local_free_info+0x720/0x8a4 fs/ocfs2/quota_local.c:869
dquot_disable+0xebc/0x17c0 fs/quota/dquot.c:2316
dquot_suspend include/linux/quotaops.h:85 [inline]
ocfs2_susp_quotas+0x1f0/0x2d4 fs/ocfs2/super.c:892
ocfs2_remount+0x464/0x9cc fs/ocfs2/super.c:647
legacy_reconfigure+0xfc/0x114 fs/fs_context.c:655
reconfigure_super+0x318/0x7a4 fs/super.c:977
do_remount fs/namespace.c:2712 [inline]
path_mount+0xc70/0xe5c fs/namespace.c:3378
do_mount fs/namespace.c:3399 [inline]
__do_sys_mount fs/namespace.c:3607 [inline]
__se_sys_mount fs/namespace.c:3584 [inline]
__arm64_sys_mount+0x45c/0x594 fs/namespace.c:3584
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
Last potentially related work creation:
kasan_save_stack+0x40/0x70 mm/kasan/common.c:45
__kasan_record_aux_stack+0xcc/0xe8 mm/kasan/generic.c:486
kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:496
call_rcu+0xfc/0xa40 kernel/rcu/tree.c:2845
__qdisc_destroy+0x2b0/0x558 net/sched/sch_generic.c:1084
qdisc_put net/sched/sch_generic.c:1104 [inline]
dev_shutdown+0x360/0x480 net/sched/sch_generic.c:1492
unregister_netdevice_many+0x934/0x175c net/core/dev.c:10938
default_device_exit_batch+0x9f4/0xa70 net/core/dev.c:11460
ops_exit_list net/core/net_namespace.c:177 [inline]
cleanup_net+0x5dc/0xa18 net/core/net_namespace.c:621
process_one_work+0x7ac/0x1404 kernel/workqueue.c:2292
worker_thread+0x8e4/0xfec kernel/workqueue.c:2439
kthread+0x250/0x2d8 kernel/kthread.c:376
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:864
The buggy address belongs to the object at ffff00011020c000
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 40 bytes inside of
1024-byte region [ffff00011020c000, ffff00011020c400)
The buggy address belongs to the physical page:
page:0000000097b987fa refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x150208
head:0000000097b987fa order:3 compound_mapcount:0 compound_pincount:0
flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000010200 dead000000000100 dead000000000122 ffff0000c0002780
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff00011020bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff00011020bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff00011020c000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff00011020c080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff00011020c100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup