syzbot


BUG: unable to handle kernel paging request in ovl_set_acl

Status: upstream: reported C repro on 2022/11/02 16:35
Reported-by: syzbot+3f6ef1c4586bb6fd1f61@syzkaller.appspotmail.com
Fix commit: 5b52aebef895 ovl: call posix_acl_release() after error checking
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 96d, last: 94d

Cause bisection: failed (bisect log)
Last patch testing requests:
Created Duration User Patch Repo Result
2022/11/03 07:26 18m brauner@kernel.org https://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping.git/ 5b52aebef8954cadff29918bb61d7fdc7be07837 error

Sample crash report:
BUG: unable to handle page fault for address: ffffffffffffffc3
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD bc8f067 P4D bc8f067 PUD bc91067 PMD 0 
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 5240 Comm: syz-executor244 Not tainted 6.1.0-rc3-next-20221102-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022
RIP: 0010:arch_atomic_fetch_sub arch/x86/include/asm/atomic.h:190 [inline]
RIP: 0010:atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:177 [inline]
RIP: 0010:__refcount_sub_and_test include/linux/refcount.h:272 [inline]
RIP: 0010:__refcount_dec_and_test include/linux/refcount.h:315 [inline]
RIP: 0010:refcount_dec_and_test include/linux/refcount.h:333 [inline]
RIP: 0010:posix_acl_release include/linux/posix_acl.h:57 [inline]
RIP: 0010:posix_acl_release include/linux/posix_acl.h:55 [inline]
RIP: 0010:ovl_set_or_remove_acl fs/overlayfs/inode.c:624 [inline]
RIP: 0010:ovl_set_acl+0x730/0x910 fs/overlayfs/inode.c:685
Code: a3 24 ff 4c 89 ff 49 89 c4 e8 cc 2f 81 fe 4d 85 e4 74 7f e8 52 e9 ac fe be 04 00 00 00 4c 89 e7 bb ff ff ff ff e8 60 7a f9 fe <f0> 41 0f c1 1c 24 bf 01 00 00 00 89 de e8 fe e5 ac fe 83 fb 01 0f
RSP: 0018:ffffc90003c0fad8 EFLAGS: 00010246
RAX: 0000000000000001 RBX: 00000000ffffffff RCX: ffffffff82cff810
RDX: fffffbfffffffff9 RSI: 0000000000000004 RDI: ffffffffffffffc3
RBP: ffff888078a5ca48 R08: 0000000000000001 R09: ffffffffffffffc6
R10: fffffbfffffffff8 R11: 0000000000000001 R12: ffffffffffffffc3
R13: ffff8880764ba330 R14: 1ffff92000781f60 R15: ffff888024e04f00
FS:  0000555555b7c300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffc3 CR3: 0000000026941000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 set_posix_acl+0x257/0x320 fs/posix_acl.c:957
 vfs_remove_acl+0x272/0x630 fs/posix_acl.c:1209
 removexattr+0x12a/0x1b0 fs/xattr.c:894
 path_removexattr+0x174/0x1a0 fs/xattr.c:910
 __do_sys_removexattr fs/xattr.c:924 [inline]
 __se_sys_removexattr fs/xattr.c:921 [inline]
 __x64_sys_removexattr+0x55/0x80 fs/xattr.c:921
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f653cc6fbf9
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffffec22658 EFLAGS: 00000246 ORIG_RAX: 00000000000000c5
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f653cc6fbf9
RDX: 00007f653cc6fbf9 RSI: 0000000020000040 RDI: 0000000020000000
RBP: 00007f653cc33da0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000020000280 R11: 0000000000000246 R12: 00007f653cc33e30
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
Modules linked in:
CR2: ffffffffffffffc3
---[ end trace 0000000000000000 ]---
RIP: 0010:arch_atomic_fetch_sub arch/x86/include/asm/atomic.h:190 [inline]
RIP: 0010:atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:177 [inline]
RIP: 0010:__refcount_sub_and_test include/linux/refcount.h:272 [inline]
RIP: 0010:__refcount_dec_and_test include/linux/refcount.h:315 [inline]
RIP: 0010:refcount_dec_and_test include/linux/refcount.h:333 [inline]
RIP: 0010:posix_acl_release include/linux/posix_acl.h:57 [inline]
RIP: 0010:posix_acl_release include/linux/posix_acl.h:55 [inline]
RIP: 0010:ovl_set_or_remove_acl fs/overlayfs/inode.c:624 [inline]
RIP: 0010:ovl_set_acl+0x730/0x910 fs/overlayfs/inode.c:685
Code: a3 24 ff 4c 89 ff 49 89 c4 e8 cc 2f 81 fe 4d 85 e4 74 7f e8 52 e9 ac fe be 04 00 00 00 4c 89 e7 bb ff ff ff ff e8 60 7a f9 fe <f0> 41 0f c1 1c 24 bf 01 00 00 00 89 de e8 fe e5 ac fe 83 fb 01 0f
RSP: 0018:ffffc90003c0fad8 EFLAGS: 00010246
RAX: 0000000000000001 RBX: 00000000ffffffff RCX: ffffffff82cff810
RDX: fffffbfffffffff9 RSI: 0000000000000004 RDI: ffffffffffffffc3
RBP: ffff888078a5ca48 R08: 0000000000000001 R09: ffffffffffffffc6
R10: fffffbfffffffff8 R11: 0000000000000001 R12: ffffffffffffffc3
R13: ffff8880764ba330 R14: 1ffff92000781f60 R15: ffff888024e04f00
FS:  0000555555b7c300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffc3 CR3: 0000000026941000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	a3 24 ff 4c 89 ff 49 	movabs %eax,0xc48949ff894cff24
   7:	89 c4
   9:	e8 cc 2f 81 fe       	callq  0xfe812fda
   e:	4d 85 e4             	test   %r12,%r12
  11:	74 7f                	je     0x92
  13:	e8 52 e9 ac fe       	callq  0xfeace96a
  18:	be 04 00 00 00       	mov    $0x4,%esi
  1d:	4c 89 e7             	mov    %r12,%rdi
  20:	bb ff ff ff ff       	mov    $0xffffffff,%ebx
  25:	e8 60 7a f9 fe       	callq  0xfef97a8a
* 2a:	f0 41 0f c1 1c 24    	lock xadd %ebx,(%r12) <-- trapping instruction
  30:	bf 01 00 00 00       	mov    $0x1,%edi
  35:	89 de                	mov    %ebx,%esi
  37:	e8 fe e5 ac fe       	callq  0xfeace63a
  3c:	83 fb 01             	cmp    $0x1,%ebx
  3f:	0f                   	.byte 0xf

Crashes (4):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-linux-next-kasan-gce-root 2022/11/03 02:35 linux-next 61c3426aca2c 08977f5d .config strace log report syz C [disk image] [vmlinux] [kernel image] BUG: unable to handle kernel paging request in ovl_set_acl
ci-upstream-linux-next-kasan-gce-root 2022/11/04 02:27 linux-next 81214a573d19 6d752409 .config console log report info [disk image] [vmlinux] [kernel image] BUG: unable to handle kernel paging request in ovl_set_acl
ci-upstream-linux-next-kasan-gce-root 2022/11/02 21:19 linux-next 61c3426aca2c 08977f5d .config console log report info [disk image] [vmlinux] [kernel image] BUG: unable to handle kernel paging request in ovl_set_acl
ci-upstream-linux-next-kasan-gce-root 2022/11/02 15:49 linux-next 61c3426aca2c 08977f5d .config console log report info [disk image] [vmlinux] [kernel image] BUG: unable to handle kernel paging request in ovl_set_acl
* Struck through repros no longer work on HEAD.