[Android 5.15] BUG: unable to handle kernel NULL pointer dereference in z_erofs_decompress

0 views
Skip to first unread message

syzbot

unread,
4:21 AM (10 hours ago) 4:21 AM
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: e63ebedc51b2 Revert "mmc: core: Avoid bitfield RMW for cla..
git tree: android13-5.15-lts
console output: https://syzkaller.appspot.com/x/log.txt?x=15ba516e580000
kernel config: https://syzkaller.appspot.com/x/.config?x=daefb08bb2811735
dashboard link: https://syzkaller.appspot.com/bug?extid=e407c0ff6d2436109ecb
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=177c4d06580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12cceece580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/75a13e157b2f/disk-e63ebedc.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/56db7e7d5e08/vmlinux-e63ebedc.xz
kernel image: https://storage.googleapis.com/syzbot-assets/288f8cdc5910/bzImage-e63ebedc.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/5fda29a7ce53/mount_0.gz
fsck result: failed (log: https://syzkaller.appspot.com/x/fsck.log?x=137c4d06580000)

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

loop2: detected capacity change from 0 to 16
erofs: (device loop2): mounted with root inode @ nid 36.
erofs: (device loop2): z_erofs_extent_lookback: bogus lookback distance @ nid 36
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 123e22067 P4D 123e22067 PUD 0
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 373 Comm: syz.2.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc9000400eb48 EFLAGS: 00010246
RAX: 1ffffffff0ac1962 RBX: ffffc9000400f4a0 RCX: ffff88811172e2c0
RDX: 0000000000000000 RSI: ffffc9000400f4a0 RDI: ffffc9000400f000
RBP: ffffc9000400eb70 R08: ffffc9000400f02f R09: ffffc9000400f02a
R10: dffffc0000000000 R11: fffff52000801e06 R12: dffffc0000000000
R13: 000000000000073b R14: ffffc9000400f000 R15: ffffffff8560cb10
FS: 000055557dfaa500(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 000000012ee91000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
z_erofs_decompress+0x79/0xb0 fs/erofs/decompressor.c:360
z_erofs_decompress_pcluster fs/erofs/zdata.c:1110 [inline]
z_erofs_decompress_queue+0x10d4/0x1a30 fs/erofs/zdata.c:1188
z_erofs_runqueue+0x113e/0x11c0 fs/erofs/zdata.c:-1
z_erofs_readpage+0x25d/0x4d0 fs/erofs/zdata.c:1601
do_read_cache_page+0x66e/0xa30 mm/filemap.c:-1
read_cache_page+0x50/0x70 mm/filemap.c:3659
read_mapping_page include/linux/pagemap.h:513 [inline]
find_target_block_classic fs/erofs/namei.c:104 [inline]
erofs_namei+0x152/0xfa0 fs/erofs/namei.c:184
erofs_lookup+0xa5/0x260 fs/erofs/namei.c:228
__lookup_slow+0x2b8/0x410 fs/namei.c:1671
lookup_slow+0x57/0x70 fs/namei.c:1688
walk_component+0x325/0x460 fs/namei.c:1984
link_path_walk+0x665/0xd60 fs/namei.c:-1
path_openat+0x27b/0x2f20 fs/namei.c:3746
do_filp_open+0x1e2/0x410 fs/namei.c:3777
do_sys_openat2+0x15e/0x7f0 fs/open.c:1236
do_sys_open fs/open.c:1252 [inline]
__do_sys_open fs/open.c:1260 [inline]
__se_sys_open fs/open.c:1256 [inline]
__x64_sys_open+0x11c/0x140 fs/open.c:1256
x64_sys_call+0x3fc/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:3
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fb5425e5dd9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffce6f6e8f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 00007fb54285efa0 RCX: 00007fb5425e5dd9
RDX: 0000000000000000 RSI: 00000000001a1342 RDI: 0000200000000000
RBP: 00007fb54267bd69 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fb54285efac R14: 00007fb54285efa0 R15: 00007fb54285efa0
</TASK>
Modules linked in:
CR2: 0000000000000000
---[ end trace 1ba30838848932bb ]---
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc9000400eb48 EFLAGS: 00010246
RAX: 1ffffffff0ac1962 RBX: ffffc9000400f4a0 RCX: ffff88811172e2c0
RDX: 0000000000000000 RSI: ffffc9000400f4a0 RDI: ffffc9000400f000
RBP: ffffc9000400eb70 R08: ffffc9000400f02f R09: ffffc9000400f02a
R10: dffffc0000000000 R11: fffff52000801e06 R12: dffffc0000000000
R13: 000000000000073b R14: ffffc9000400f000 R15: ffffffff8560cb10
FS: 000055557dfaa500(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 000000012ee91000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


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

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
Reply all
Reply to author
Forward
0 new messages