[v6.1] BUG: unable to handle kernel paging request in direct2indirect

0 views
Skip to first unread message

syzbot

unread,
Apr 15, 2023, 2:26:45 AM4/15/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 0102425ac76b Linux 6.1.24
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=144b28afc80000
kernel config: https://syzkaller.appspot.com/x/.config?x=f23561925d39903
dashboard link: https://syzkaller.appspot.com/bug?extid=24f29f655bd6bef3c1fa
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/11b4f76a294e/disk-0102425a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/45c8eec62c60/vmlinux-0102425a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0a7b8f48ec43/Image-0102425a.gz.xz

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

REISERFS warning: reiserfs-5093 is_leaf: item entry count seems wrong *3.5*[2 1 0(1) DIR], item_len 35, item_location 4029, free_space(entry_count) 2
REISERFS error (device loop4): vs-5150 search_by_key: invalid format found in block 532. Fsck?
REISERFS (device loop4): Remounting filesystem read-only
Unable to handle kernel paging request at virtual address dfff800000000005
KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f]
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
[dfff800000000005] address between user and kernel address ranges
Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 14757 Comm: syz-executor.4 Not tainted 6.1.24-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : reiserfs_node_data fs/reiserfs/reiserfs.h:2184 [inline]
pc : item_head fs/reiserfs/reiserfs.h:2200 [inline]
pc : tp_item_head fs/reiserfs/reiserfs.h:2226 [inline]
pc : direct2indirect+0x6c4/0x10f8 fs/reiserfs/tail_conversion.c:119
lr : tp_item_head fs/reiserfs/reiserfs.h:2226 [inline]
lr : direct2indirect+0x684/0x10f8 fs/reiserfs/tail_conversion.c:119
sp : ffff800025366de0
x29: ffff800025366f20 x28: 0000000000000000 x27: 0000000000000028
x26: ffff00012cb38bd8 x25: ffff800025366e60 x24: ffff800025367418
x23: dfff800000000000 x22: 0000000100000fff x21: ffff800025367410
x20: ffff800025367430 x19: 0000000000000000 x18: ffff80002536689e
x17: 0000000000000000 x16: 0000000000000000
x15: 0000000000000000
x14: 0000000000000000 x13: 00000000fffffffe x12: ffff00011fb59b40
x11: ff80800008d98d44 x10: 0000000000000000 x9 : ffff800008d98d44
x8 : 0000000000000005 x7 : 00000000003e22b8 x6 : 00000000003e2230
x5 : ffff800025366078 x4 : ffff80001566e860
x3 : ffff800008b23378

x2 : 0000000000000001 x1 : 0000000000000001 x0 : 0000000000000008
Call trace:
reiserfs_node_data fs/reiserfs/reiserfs.h:2184 [inline]
item_head fs/reiserfs/reiserfs.h:2200 [inline]
tp_item_head fs/reiserfs/reiserfs.h:2226 [inline]
direct2indirect+0x6c4/0x10f8 fs/reiserfs/tail_conversion.c:119
reiserfs_get_block+0x40c4/0x45d8 fs/reiserfs/inode.c:949
__block_write_begin_int+0x340/0x13b4 fs/buffer.c:1991
__block_write_begin+0x7c/0xa0 fs/buffer.c:2041
reiserfs_write_begin+0x328/0x71c fs/reiserfs/inode.c:2775
generic_perform_write+0x278/0x55c mm/filemap.c:3754
__generic_file_write_iter+0x168/0x388 mm/filemap.c:3882
generic_file_write_iter+0xb8/0x2b4 mm/filemap.c:3914
call_write_iter include/linux/fs.h:2205 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x610/0x914 fs/read_write.c:584
ksys_write+0x15c/0x26c fs/read_write.c:637
__do_sys_write fs/read_write.c:649 [inline]
__se_sys_write fs/read_write.c:646 [inline]
__arm64_sys_write+0x7c/0x90 fs/read_write.c:646
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
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:581
Code: 350011e8 9100a27b b9800293 d343ff68 (38776908)
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
0: 350011e8 cbnz w8, 0x23c
4: 9100a27b add x27, x19, #0x28
8: b9800293 ldrsw x19, [x20]
c: d343ff68 lsr x8, x27, #3
* 10: 38776908 ldrb w8, [x8, x23] <-- trapping instruction


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

syzbot

unread,
Jun 3, 2023, 6:37:45 AM6/3/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: d2869ace6eeb Linux 6.1.31
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16b5b895280000
kernel config: https://syzkaller.appspot.com/x/.config?x=623aacf949348d7d
dashboard link: https://syzkaller.appspot.com/bug?extid=24f29f655bd6bef3c1fa
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=163e2779280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=132665a3280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/2ed651ed0d8f/disk-d2869ace.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b8d3199c542c/vmlinux-d2869ace.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a44812549bf7/bzImage-d2869ace.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/af641d3fb302/mount_0.gz

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

REISERFS (device loop0): checking transaction log (loop0)
REISERFS (device loop0): Using r5 hash to sort names
REISERFS (device loop0): using 3.5.x disk format
REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage.
REISERFS warning: reiserfs-5093 is_leaf: item entry count seems wrong *3.5*[2 1 0(1) DIR], item_len 35, item_location 4029, free_space(entry_count) 2
REISERFS error (device loop0): vs-5150 search_by_key: invalid format found in block 532. Fsck?
REISERFS (device loop0): Remounting filesystem read-only
general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f]
CPU: 0 PID: 3610 Comm: syz-executor248 Not tainted 6.1.31-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
RIP: 0010:reiserfs_node_data fs/reiserfs/reiserfs.h:2184 [inline]
RIP: 0010:item_head fs/reiserfs/reiserfs.h:2200 [inline]
RIP: 0010:tp_item_head fs/reiserfs/reiserfs.h:2226 [inline]
RIP: 0010:direct2indirect+0x957/0x1830 fs/reiserfs/tail_conversion.c:119
Code: 49 c1 e7 04 4a 8d 5c 39 08 48 89 d8 48 c1 e8 03 0f b6 04 10 84 c0 0f 85 3d 03 00 00 48 63 1b 49 83 c5 28 4c 89 e8 48 c1 e8 03 <80> 3c 10 00 74 12 4c 89 ef e8 fb 17 b4 ff 48 ba 00 00 00 00 00 fc
RSP: 0018:ffffc90003e3f0a0 EFLAGS: 00010206
RAX: 0000000000000005 RBX: 0000000000000000 RCX: ffffc90003e3f678
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: 0000000000000008
RBP: ffffc90003e3f230 R08: ffffffff822c041b R09: ffffffff822b2839
R10: 0000000000000002 R11: ffff8880236ebb80 R12: 0000000000000001
R13: 0000000000000028 R14: 0000000000000000 R15: 0000000000000010
FS: 00007fd704c6c700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fd6fcc4b718 CR3: 000000001ae42000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
reiserfs_get_block+0x4c57/0x5150 fs/reiserfs/inode.c:949
__block_write_begin_int+0x544/0x1a30 fs/buffer.c:1991
reiserfs_write_begin+0x249/0x510 fs/reiserfs/inode.c:2775
generic_cont_expand_simple+0x187/0x2a0 fs/buffer.c:2347
reiserfs_setattr+0x606/0x11c0 fs/reiserfs/inode.c:3305
notify_change+0xdcd/0x1080 fs/attr.c:482
do_truncate+0x21c/0x300 fs/open.c:65
do_sys_ftruncate+0x2e2/0x380 fs/open.c:193
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fd704ccb739
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 18 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fd704c6c2f8 EFLAGS: 00000246 ORIG_RAX: 000000000000004d
RAX: ffffffffffffffda RBX: 00007fd704d4a780 RCX: 00007fd704ccb739
RDX: 00007fd704ccb739 RSI: 0000000000000f88 RDI: 0000000000000004
RBP: 00007fd704d166b8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0030656c69662f2e
R13: 7366726573696572 R14: 6576652e73646970 R15: 00007fd704d4a788
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:reiserfs_node_data fs/reiserfs/reiserfs.h:2184 [inline]
RIP: 0010:item_head fs/reiserfs/reiserfs.h:2200 [inline]
RIP: 0010:tp_item_head fs/reiserfs/reiserfs.h:2226 [inline]
RIP: 0010:direct2indirect+0x957/0x1830 fs/reiserfs/tail_conversion.c:119
Code: 49 c1 e7 04 4a 8d 5c 39 08 48 89 d8 48 c1 e8 03 0f b6 04 10 84 c0 0f 85 3d 03 00 00 48 63 1b 49 83 c5 28 4c 89 e8 48 c1 e8 03 <80> 3c 10 00 74 12 4c 89 ef e8 fb 17 b4 ff 48 ba 00 00 00 00 00 fc
RSP: 0018:ffffc90003e3f0a0 EFLAGS: 00010206
RAX: 0000000000000005 RBX: 0000000000000000 RCX: ffffc90003e3f678
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: 0000000000000008
RBP: ffffc90003e3f230 R08: ffffffff822c041b R09: ffffffff822b2839
R10: 0000000000000002 R11: ffff8880236ebb80 R12: 0000000000000001
R13: 0000000000000028 R14: 0000000000000000 R15: 0000000000000010
FS: 00007fd704c6c700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fd6fcc4b718 CR3: 000000001ae42000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 49 c1 e7 04 shl $0x4,%r15
4: 4a 8d 5c 39 08 lea 0x8(%rcx,%r15,1),%rbx
9: 48 89 d8 mov %rbx,%rax
c: 48 c1 e8 03 shr $0x3,%rax
10: 0f b6 04 10 movzbl (%rax,%rdx,1),%eax
14: 84 c0 test %al,%al
16: 0f 85 3d 03 00 00 jne 0x359
1c: 48 63 1b movslq (%rbx),%rbx
1f: 49 83 c5 28 add $0x28,%r13
23: 4c 89 e8 mov %r13,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 80 3c 10 00 cmpb $0x0,(%rax,%rdx,1) <-- trapping instruction
2e: 74 12 je 0x42
30: 4c 89 ef mov %r13,%rdi
33: e8 fb 17 b4 ff callq 0xffb41833
38: 48 rex.W
39: ba 00 00 00 00 mov $0x0,%edx
3e: 00 fc add %bh,%ah


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