syzbot


general protection fault in cache_first_page

Status: fixed on 2023/06/08 14:41
Subsystems: squashfs
[Documentation on labels]
Reported-by: syzbot+082fa4af80a5bb1a9843@syzkaller.appspotmail.com
Fix commit: f65c4bbbd682 Squashfs: fix handling and sanity checking of xattr_ids count 72e544b1b283 squashfs: harden sanity check in squashfs_read_xattr_id_table
First crash: 471d, last: 455d
Cause bisection: failed (error log, bisect log)
  
Discussions (3)
Title Replies (including bot) Last reply
[PATCH 0/1] squashfs: harden sanity check in squashfs_read_xattr_id_table 4 (4) 2023/01/27 07:24
[PATCH] Squashfs: fix handling and sanity checking of xattr_ids count 1 (1) 2023/01/27 06:18
[syzbot] [squashfs?] general protection fault in cache_first_page 0 (1) 2023/01/06 23:40
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 general protection fault in cache_first_page squashfs 2 421d 431d 0/1 upstream: reported on 2023/02/12 02:17

Sample crash report:
loop0: detected capacity change from 0 to 8
general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
CPU: 0 PID: 5061 Comm: syz-executor165 Not tainted 6.2.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:cache_first_page+0x60/0x90 fs/squashfs/page_actor.c:27
Code: 00 00 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 75 30 48 b8 00 00 00 00 00 fc ff df 48 8b 1b 48 89 da 48 c1 ea 03 <80> 3c 02 00 75 0c 48 8b 03 5b c3 e8 80 47 92 ff eb bc 48 89 df e8
RSP: 0018:ffffc90003cbfac0 EFLAGS: 00010212
RAX: dffffc0000000000 RBX: 0000000000000010 RCX: 0000000000000000
RDX: 0000000000000002 RSI: ffffffff823d0d6d RDI: ffff88801e25da40
RBP: ffff88807c718000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 000000000000035c R15: 0000000000000000
FS:  000055555707d300(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffc5ca52000 CR3: 0000000026419000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 squashfs_first_page fs/squashfs/page_actor.h:43 [inline]
 copy_bio_to_actor fs/squashfs/block.c:44 [inline]
 squashfs_read_data+0x7de/0xf50 fs/squashfs/block.c:221
 squashfs_read_table+0x15c/0x1f0 fs/squashfs/cache.c:432
 squashfs_read_xattr_id_table+0x20c/0x440 fs/squashfs/xattr_id.c:95
 squashfs_fill_super+0xf08/0x2700 fs/squashfs/super.c:348
 get_tree_bdev+0x444/0x760 fs/super.c:1282
 vfs_get_tree+0x8d/0x2f0 fs/super.c:1489
 do_new_mount fs/namespace.c:3145 [inline]
 path_mount+0x132a/0x1e20 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]
 __x64_sys_mount+0x283/0x300 fs/namespace.c:3674
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fc524a6fafa
Code: 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 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:00007ffc5ca51ad8 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fc524a6fafa
RDX: 0000000020000200 RSI: 0000000020000240 RDI: 00007ffc5ca51af0
RBP: 00007ffc5ca51af0 R08: 00007ffc5ca51b30 R09: 00000000000001f1
R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000000004
R13: 000055555707d2c0 R14: 0000000000000000 R15: 00007ffc5ca51b30
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:cache_first_page+0x60/0x90 fs/squashfs/page_actor.c:27
Code: 00 00 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 75 30 48 b8 00 00 00 00 00 fc ff df 48 8b 1b 48 89 da 48 c1 ea 03 <80> 3c 02 00 75 0c 48 8b 03 5b c3 e8 80 47 92 ff eb bc 48 89 df e8
RSP: 0018:ffffc90003cbfac0 EFLAGS: 00010212
RAX: dffffc0000000000 RBX: 0000000000000010 RCX: 0000000000000000
RDX: 0000000000000002 RSI: ffffffff823d0d6d RDI: ffff88801e25da40
RBP: ffff88807c718000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 000000000000035c R15: 0000000000000000
FS:  000055555707d300(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffc5ca52000 CR3: 0000000026419000 CR4: 0000000000350ef0
----------------
Code disassembly (best guess):
   0:	00 00                	add    %al,(%rax)
   2:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
   9:	fc ff df
   c:	48 c1 ea 03          	shr    $0x3,%rdx
  10:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
  14:	75 30                	jne    0x46
  16:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  1d:	fc ff df
  20:	48 8b 1b             	mov    (%rbx),%rbx
  23:	48 89 da             	mov    %rbx,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2e:	75 0c                	jne    0x3c
  30:	48 8b 03             	mov    (%rbx),%rax
  33:	5b                   	pop    %rbx
  34:	c3                   	retq
  35:	e8 80 47 92 ff       	callq  0xff9247ba
  3a:	eb bc                	jmp    0xfffffff8
  3c:	48 89 df             	mov    %rbx,%rdi
  3f:	e8                   	.byte 0xe8

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/02 23:38 upstream 88603b6dc419 ab32d508 .config strace log report syz C [mounted in repro] ci-upstream-kasan-gce-root general protection fault in cache_first_page
2023/01/03 00:20 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 ab32d508 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 BUG: unable to handle kernel NULL pointer dereference in cache_first_page
2023/01/02 23:28 upstream 88603b6dc419 ab32d508 .config console log report info ci-upstream-kasan-gce-root general protection fault in cache_first_page
2023/01/19 06:42 upstream 7287904c8771 66fca3ae .config console log report info ci-qemu-upstream-386 general protection fault in cache_first_page
* Struck through repros no longer work on HEAD.