syzbot


WARNING: locking bug in hfsplus_delete_cat

Status: upstream: reported on 2022/12/05 08:02
Reported-by: syzbot+95214da0d40d4ec44f1c@syzkaller.appspotmail.com
First crash: 62d, last: 18d

Sample crash report:
------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(1)
WARNING: CPU: 1 PID: 7477 at kernel/locking/lockdep.c:231 check_wait_context kernel/locking/lockdep.c:4729 [inline]
WARNING: CPU: 1 PID: 7477 at kernel/locking/lockdep.c:231 __lock_acquire+0x2b0/0x3084 kernel/locking/lockdep.c:5005
Modules linked in:
CPU: 1 PID: 7477 Comm: syz-executor.3 Not tainted 6.2.0-rc3-syzkaller-16387-g9598c377d828 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : check_wait_context kernel/locking/lockdep.c:4729 [inline]
pc : __lock_acquire+0x2b0/0x3084 kernel/locking/lockdep.c:5005
lr : hlock_class kernel/locking/lockdep.c:231 [inline]
lr : check_wait_context kernel/locking/lockdep.c:4729 [inline]
lr : __lock_acquire+0x298/0x3084 kernel/locking/lockdep.c:5005
sp : ffff800010fc3610
x29: ffff800010fc36f0 x28: 0000000000000003 x27: ffff00011257b478
x26: ffff000113f78160 x25: ffff00011257be68 x24: 0000000000000000
x23: 0000000000000000 x22: 0000000000000001 x21: 0000000000000000
x20: 0000000000000000 x19: 555555555553ffcb x18: 00000000000000c0
x17: ffff80000df48158 x16: ffff80000dd86118 x15: ffff00011257b400
x14: 0000000000000000 x13: 0000000000000012 x12: 0000000000040000
x11: 0000000000025658 x10: ffff80000df48158 x9 : 3311873e13d9f200
x8 : 0000000000000000 x7 : 4e5241575f534b43 x6 : ffff80000c11ee8c
x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000
x2 : 0000000000000000 x1 : 0000000100000001 x0 : 0000000000000016
Call trace:
 check_wait_context kernel/locking/lockdep.c:4729 [inline]
 __lock_acquire+0x2b0/0x3084 kernel/locking/lockdep.c:5005
 lock_acquire+0x100/0x1f8 kernel/locking/lockdep.c:5668
 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
 _raw_spin_lock+0x54/0x6c kernel/locking/spinlock.c:154
 spin_lock include/linux/spinlock.h:350 [inline]
 hfsplus_delete_cat+0x1fc/0x4a0 fs/hfsplus/catalog.c:395
 hfsplus_fill_super+0x828/0x864 fs/hfsplus/super.c:576
 mount_bdev+0x1b8/0x210 fs/super.c:1359
 hfsplus_mount+0x44/0x58 fs/hfsplus/super.c:641
 legacy_get_tree+0x30/0x74 fs/fs_context.c:610
 vfs_get_tree+0x40/0x140 fs/super.c:1489
 do_new_mount+0x1dc/0x4e4 fs/namespace.c:3145
 path_mount+0x358/0x890 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]
 __arm64_sys_mount+0x2c4/0x3c4 fs/namespace.c:3674
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall arch/arm64/kernel/syscall.c:52 [inline]
 el0_svc_common+0x138/0x220 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x48/0x104 arch/arm64/kernel/syscall.c:193
 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:584
irq event stamp: 3767
hardirqs last  enabled at (3767): [<ffff80000c123ff8>] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:151 [inline]
hardirqs last  enabled at (3767): [<ffff80000c123ff8>] _raw_spin_unlock_irqrestore+0x48/0x8c kernel/locking/spinlock.c:194
hardirqs last disabled at (3766): [<ffff80000c123e34>] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline]
hardirqs last disabled at (3766): [<ffff80000c123e34>] _raw_spin_lock_irqsave+0xa4/0xb4 kernel/locking/spinlock.c:162
softirqs last  enabled at (3740): [<ffff8000080102e4>] _stext+0x2e4/0x37c
softirqs last disabled at (3723): [<ffff800008017c90>] ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:80
---[ end trace 0000000000000000 ]---
Unable to handle kernel NULL pointer dereference at virtual address 00000000000000b8
Mem abort info:
  ESR = 0x0000000096000006
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
  FSC = 0x06: level 2 translation fault
Data abort info:
  ISV = 0, ISS = 0x00000006
  CM = 0, WnR = 0
user pgtable: 4k pages, 48-bit VAs, pgdp=000000014f845000
[00000000000000b8] pgd=080000015269b003, p4d=080000015269b003, pud=080000014f3c2003, pmd=0000000000000000
Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 7477 Comm: syz-executor.3 Tainted: G        W          6.2.0-rc3-syzkaller-16387-g9598c377d828 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : check_wait_context kernel/locking/lockdep.c:4729 [inline]
pc : __lock_acquire+0x2d0/0x3084 kernel/locking/lockdep.c:5005
lr : hlock_class kernel/locking/lockdep.c:231 [inline]
lr : check_wait_context kernel/locking/lockdep.c:4729 [inline]
lr : __lock_acquire+0x298/0x3084 kernel/locking/lockdep.c:5005
sp : ffff800010fc3610
x29: ffff800010fc36f0 x28: 0000000000000003 x27: ffff00011257b478
x26: ffff000113f78160 x25: ffff00011257be68 x24: 0000000000000000
x23: 0000000000000000 x22: 0000000000000001 x21: 0000000000000000
x20: 0000000000000000 x19: 555555555553ffcb x18: 00000000000000c0
x17: ffff80000df48158 x16: ffff80000dd86118 x15: ffff00011257b400
x14: 0000000000000000 x13: 0000000000000012 x12: 0000000000040000
x11: 0000000000025658 x10: ffff80000df48158 x9 : 0000000000041fcb
x8 : 0000000000000000 x7 : 4e5241575f534b43 x6 : ffff80000c11ee8c
x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000
x2 : 0000000000000000 x1 : 0000000100000001 x0 : 0000000000000016
Call trace:
 hlock_class kernel/locking/lockdep.c:222 [inline]
 check_wait_context kernel/locking/lockdep.c:4730 [inline]
 __lock_acquire+0x2d0/0x3084 kernel/locking/lockdep.c:5005
 lock_acquire+0x100/0x1f8 kernel/locking/lockdep.c:5668
 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
 _raw_spin_lock+0x54/0x6c kernel/locking/spinlock.c:154
 spin_lock include/linux/spinlock.h:350 [inline]
 hfsplus_delete_cat+0x1fc/0x4a0 fs/hfsplus/catalog.c:395
 hfsplus_fill_super+0x828/0x864 fs/hfsplus/super.c:576
 mount_bdev+0x1b8/0x210 fs/super.c:1359
 hfsplus_mount+0x44/0x58 fs/hfsplus/super.c:641
 legacy_get_tree+0x30/0x74 fs/fs_context.c:610
 vfs_get_tree+0x40/0x140 fs/super.c:1489
 do_new_mount+0x1dc/0x4e4 fs/namespace.c:3145
 path_mount+0x358/0x890 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]
 __arm64_sys_mount+0x2c4/0x3c4 fs/namespace.c:3674
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall arch/arm64/kernel/syscall.c:52 [inline]
 el0_svc_common+0x138/0x220 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x48/0x104 arch/arm64/kernel/syscall.c:193
 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:584
Code: 9002ed2a 91046210 9105614a b9400329 (3942e114) 
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
   0:	9002ed2a 	adrp	x10, 0x5da4000
   4:	91046210 	add	x16, x16, #0x118
   8:	9105614a 	add	x10, x10, #0x158
   c:	b9400329 	ldr	w9, [x25]
* 10:	3942e114 	ldrb	w20, [x8, #184] <-- trapping instruction

Crashes (4):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-gce-arm64 2023/01/17 17:35 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 9598c377d828 aedf5331 .config console log report info [disk image] [vmlinux] [kernel image] WARNING: locking bug in hfsplus_delete_cat
ci-upstream-gce-arm64 2023/01/13 14:26 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 9598c377d828 529798b0 .config console log report info [disk image] [vmlinux] [kernel image] WARNING: locking bug in hfsplus_delete_cat
ci-upstream-gce-arm64 2022/12/25 17:09 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] WARNING: locking bug in hfsplus_delete_cat
ci-upstream-gce-arm64 2022/12/04 18:18 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci e3cb714fb489 e080de16 .config console log report info [disk image] [vmlinux] [kernel image] WARNING: locking bug in hfsplus_delete_cat
* Struck through repros no longer work on HEAD.