[v5.15] general protection fault in reiserfs_get_block

4 views
Skip to first unread message

syzbot

unread,
Sep 10, 2024, 5:00:23 AM9/10/24
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 14e468424d3e Linux 5.15.166
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15262100580000
kernel config: https://syzkaller.appspot.com/x/.config?x=8d58a8e8a6c2ab88
dashboard link: https://syzkaller.appspot.com/bug?extid=00744e88a7f1a64cea41
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/c745bbe4ebd8/disk-14e46842.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/f07c263e8276/vmlinux-14e46842.xz
kernel image: https://storage.googleapis.com/syzbot-assets/511d53dfa858/bzImage-14e46842.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+00744e...@syzkaller.appspotmail.com

general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
CPU: 0 PID: 6018 Comm: syz.2.390 Not tainted 5.15.166-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
RIP: 0010:reiserfs_get_block+0x1aca/0x5390 fs/reiserfs/inode.c:1060
Code: 48 8b 44 24 40 42 0f b6 04 20 84 c0 0f 85 bc 11 00 00 44 8b ac 24 20 04 00 00 48 8b 44 24 20 4a 8d 1c b0 48 89 d8 48 c1 e8 03 <42> 0f b6 04 20 84 c0 0f 85 bf 11 00 00 4c 89 6c 24 70 44 89 2b 48
RSP: 0018:ffffc90002e76ca0 EFLAGS: 00010203
RAX: 0000000000000001 RBX: 000000000000000c RCX: ffffc90002e77003
RDX: ffffc9000cd8e000 RSI: 00000000000003f4 RDI: 0000000000000000
RBP: ffffc90002e772f0 R08: ffffffff820a8bce R09: ffffc90002e77240
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: 00000000000002d0 R14: ffffffffffffffff R15: 00000000000003f4
FS: 00007fcaa28376c0(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000002006f000 CR3: 0000000069521000 CR4: 00000000003506f0
DR0: 0000000000002800 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
__block_write_begin_int+0x60b/0x1650 fs/buffer.c:2012
__reiserfs_write_begin+0x21c/0x460 fs/reiserfs/inode.c:2850
reiserfs_xattr_set_handle+0x421/0x10b0 fs/reiserfs/xattr.c:578
reiserfs_xattr_set+0x44e/0x570 fs/reiserfs/xattr.c:640
__vfs_setxattr+0x3e7/0x420 fs/xattr.c:182
__vfs_setxattr_noperm+0x12a/0x5e0 fs/xattr.c:216
vfs_setxattr+0x21d/0x420 fs/xattr.c:303
ovl_do_setxattr fs/overlayfs/overlayfs.h:203 [inline]
ovl_verify_set_fh+0x159/0x3b0 fs/overlayfs/namei.c:467
ovl_verify_upper fs/overlayfs/overlayfs.h:461 [inline]
ovl_get_indexdir+0x363/0x450 fs/overlayfs/super.c:1583
ovl_fill_super+0x1b44/0x2a20 fs/overlayfs/super.c:2105
mount_nodev+0x52/0xe0 fs/super.c:1444
legacy_get_tree+0xeb/0x180 fs/fs_context.c:611
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
RIP: 0033:0x7fcaa43dfef9
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:00007fcaa2837038 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fcaa4598058 RCX: 00007fcaa43dfef9
RDX: 0000000020000000 RSI: 0000000020000040 RDI: 0000000000000000
RBP: 00007fcaa44529f6 R08: 0000000020000100 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fcaa4598058 R15: 00007ffcd76e3088
</TASK>
Modules linked in:
---[ end trace 6ea2d9d6d1e2b079 ]---
RIP: 0010:reiserfs_get_block+0x1aca/0x5390 fs/reiserfs/inode.c:1060
Code: 48 8b 44 24 40 42 0f b6 04 20 84 c0 0f 85 bc 11 00 00 44 8b ac 24 20 04 00 00 48 8b 44 24 20 4a 8d 1c b0 48 89 d8 48 c1 e8 03 <42> 0f b6 04 20 84 c0 0f 85 bf 11 00 00 4c 89 6c 24 70 44 89 2b 48
RSP: 0018:ffffc90002e76ca0 EFLAGS: 00010203
RAX: 0000000000000001 RBX: 000000000000000c RCX: ffffc90002e77003
RDX: ffffc9000cd8e000 RSI: 00000000000003f4 RDI: 0000000000000000
RBP: ffffc90002e772f0 R08: ffffffff820a8bce R09: ffffc90002e77240
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: 00000000000002d0 R14: ffffffffffffffff R15: 00000000000003f4
FS: 00007fcaa28376c0(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000556ff06ba300 CR3: 0000000069521000 CR4: 00000000003506f0
DR0: 0000000000002800 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 48 8b 44 24 40 mov 0x40(%rsp),%rax
5: 42 0f b6 04 20 movzbl (%rax,%r12,1),%eax
a: 84 c0 test %al,%al
c: 0f 85 bc 11 00 00 jne 0x11ce
12: 44 8b ac 24 20 04 00 mov 0x420(%rsp),%r13d
19: 00
1a: 48 8b 44 24 20 mov 0x20(%rsp),%rax
1f: 4a 8d 1c b0 lea (%rax,%r14,4),%rbx
23: 48 89 d8 mov %rbx,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 42 0f b6 04 20 movzbl (%rax,%r12,1),%eax <-- trapping instruction
2f: 84 c0 test %al,%al
31: 0f 85 bf 11 00 00 jne 0x11f6
37: 4c 89 6c 24 70 mov %r13,0x70(%rsp)
3c: 44 89 2b mov %r13d,(%rbx)
3f: 48 rex.W


---
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

syzbot

unread,
Feb 15, 2025, 5:56:18 PM2/15/25
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: c16c81c81336 Linux 5.15.178
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1502d9a4580000
kernel config: https://syzkaller.appspot.com/x/.config?x=3ca28fba9b2e5c5
dashboard link: https://syzkaller.appspot.com/bug?extid=00744e88a7f1a64cea41
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=100c0898580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1143cbf8580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/3f2947e5e4dc/disk-c16c81c8.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/7034800fdaa8/vmlinux-c16c81c8.xz
kernel image: https://storage.googleapis.com/syzbot-assets/42337be7c213/Image-c16c81c8.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/8c65ecbc353c/mount_0.gz
fsck result: failed (log: https://syzkaller.appspot.com/x/fsck.log?x=1643cbf8580000)

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+00744e...@syzkaller.appspotmail.com

REISERFS (device loop0): Using tea hash to sort names
REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage.
REISERFS warning (device loop0): vs-13060 reiserfs_update_sd_size: stat data of object [2 5 0x0 SD] (nlink == 1) not found (pos 2)
Unable to handle kernel paging request at virtual address dfff800000000001
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
[dfff800000000001] address between user and kernel address ranges
Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 4021 Comm: syz-executor209 Not tainted 5.15.178-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : reiserfs_get_block+0x12d4/0x3fd0 fs/reiserfs/inode.c:1060
lr : reiserfs_get_block+0x1298/0x3fd0 fs/reiserfs/inode.c:1055
sp : ffff80001fce6f00
x29: ffff80001fce7580 x28: 1fffe0001c283a0b x27: ffffffffffffffff
x26: 00000000000003f4 x25: 000000000000000c x24: 0000000000000005
x23: 0000000000000000 x22: 0000000000000010 x21: 0000000000000217
x20: ffff0000ddb61598 x19: dfff800000000000 x18: 0000000000000000
x17: 0000000000000000 x16: ffff800008c9ad98 x15: 00000000fffffffd
x14: ffff0000dc3cd1c0 x13: 0000000000ff0100 x12: 0000000000000004
x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000003
x8 : 0000000000000001 x7 : 0000000000000000 x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000020
x2 : 0000000000000000 x1 : 00000000000003f4 x0 : 0000000000000000
Call trace:
reiserfs_get_block+0x12d4/0x3fd0 fs/reiserfs/inode.c:1060
__block_write_begin_int+0x3ec/0x1608 fs/buffer.c:2012
__block_write_begin+0x40/0x54 fs/buffer.c:2062
reiserfs_write_begin+0x3c8/0x654 fs/reiserfs/inode.c:2790
generic_perform_write+0x24c/0x520 mm/filemap.c:3785
__generic_file_write_iter+0x230/0x454 mm/filemap.c:3912
generic_file_write_iter+0xb4/0x1b8 mm/filemap.c:3944
call_write_iter include/linux/fs.h:2174 [inline]
new_sync_write fs/read_write.c:507 [inline]
vfs_write+0x884/0xb44 fs/read_write.c:594
ksys_write+0x15c/0x26c fs/read_write.c:647
__do_sys_write fs/read_write.c:659 [inline]
__se_sys_write fs/read_write.c:656 [inline]
__arm64_sys_write+0x7c/0x90 fs/read_write.c:656
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
Code: 35006a48 8b1b0ad9 b94483f5 d343ff28 (38f36908)
---[ end trace 793567ddd578ba4c ]---
----------------
Code disassembly (best guess):
0: 35006a48 cbnz w8, 0xd48
4: 8b1b0ad9 add x25, x22, x27, lsl #2
8: b94483f5 ldr w21, [sp, #1152]
c: d343ff28 lsr x8, x25, #3
* 10: 38f36908 ldrsb w8, [x8, x19] <-- trapping instruction


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
Reply all
Reply to author
Forward
0 new messages