syzbot


WARNING in squashfs_read_data

Status: fixed on 2024/01/20 21:18
Subsystems: squashfs
[Documentation on labels]
Reported-by: syzbot+32d3767580a1ea339a81@syzkaller.appspotmail.com
Fix commit: eb66b8abae98 squashfs: squashfs_read_data need to check if the length is 0
First crash: 106d, last: 106d
Cause bisection: failed (error log, bisect log)
  
Discussions (3)
Title Replies (including bot) Last reply
[PATCH] squashfs: squashfs_read_data need to check if the length is 0 4 (4) 2023/11/17 02:17
Re: [syzbot] [PATCH] test warning in squashfs_read_data 0 (1) 2023/11/16 01:14
[syzbot] [squashfs?] WARNING in squashfs_read_data 0 (1) 2023/11/15 13:10
Last patch testing requests (1)
Created Duration User Patch Repo Result
2023/11/16 01:14 20m lizhi.xu@windriver.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ac347a0655db OK log

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 5071 at fs/squashfs/block.c:46 copy_bio_to_actor fs/squashfs/block.c:46 [inline]
WARNING: CPU: 0 PID: 5071 at fs/squashfs/block.c:46 squashfs_read_data+0xda4/0xf80 fs/squashfs/block.c:344
Modules linked in:
CPU: 0 PID: 5071 Comm: syz-executor362 Not tainted 6.6.0-syzkaller-16039-gac347a0655db #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
RIP: 0010:copy_bio_to_actor fs/squashfs/block.c:46 [inline]
RIP: 0010:squashfs_read_data+0xda4/0xf80 fs/squashfs/block.c:344
Code: 04 02 48 89 da 83 e2 07 38 d0 0f 8f 9b f9 ff ff 84 c0 0f 84 93 f9 ff ff 48 89 df e8 06 89 90 ff e9 86 f9 ff ff e8 9c 57 3a ff <0f> 0b 31 ed e9 51 f5 ff ff e8 8e 57 3a ff 0f 0b e9 df f9 ff ff e8
RSP: 0018:ffffc900033de780 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff824d3e77
RDX: ffff8880211001c0 RSI: ffffffff824d4354 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000
R10: 0000000000000000 R11: ffffffff8a83d81f R12: 0000000000000000
R13: ffff888061b26000 R14: 0000000000000000 R15: ffff88801f0d6e00
FS:  00005555567dd380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000005fdeb8 CR3: 0000000014ee9000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 squashfs_readahead+0x16fd/0x24b0 fs/squashfs/file.c:599
 read_pages+0x1d1/0xdb0 mm/readahead.c:160
 page_cache_ra_unbounded+0x457/0x5e0 mm/readahead.c:269
 do_page_cache_ra mm/readahead.c:299 [inline]
 page_cache_ra_order+0x72b/0xa80 mm/readahead.c:546
 ondemand_readahead+0x493/0x1130 mm/readahead.c:668
 page_cache_sync_ra+0x174/0x1d0 mm/readahead.c:695
 page_cache_sync_readahead include/linux/pagemap.h:1266 [inline]
 filemap_get_pages+0xc06/0x1830 mm/filemap.c:2497
 filemap_read+0x39b/0xcf0 mm/filemap.c:2593
 generic_file_read_iter+0x346/0x450 mm/filemap.c:2772
 __kernel_read+0x301/0x870 fs/read_write.c:428
 integrity_kernel_read+0x7f/0xb0 security/integrity/iint.c:221
 ima_calc_file_hash_tfm+0x2c5/0x3d0 security/integrity/ima/ima_crypto.c:485
 ima_calc_file_shash security/integrity/ima/ima_crypto.c:516 [inline]
 ima_calc_file_hash+0x1c6/0x4a0 security/integrity/ima/ima_crypto.c:573
 ima_collect_measurement+0x85e/0xa20 security/integrity/ima/ima_api.c:290
 process_measurement+0xe92/0x2260 security/integrity/ima/ima_main.c:359
 ima_file_check+0xc2/0x110 security/integrity/ima/ima_main.c:557
 do_open fs/namei.c:3624 [inline]
 path_openat+0x77b/0x2c40 fs/namei.c:3779
 do_filp_open+0x1de/0x430 fs/namei.c:3809
 do_sys_openat2+0x176/0x1e0 fs/open.c:1440
 do_sys_open fs/open.c:1455 [inline]
 __do_sys_openat fs/open.c:1471 [inline]
 __se_sys_openat fs/open.c:1466 [inline]
 __x64_sys_openat+0x175/0x210 fs/open.c:1466
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7fb1acea25f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 17 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:00007ffe1b0ce9b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0031656c69662f2e RCX: 00007fb1acea25f9
RDX: 0000000000000000 RSI: 0000000020000000 RDI: ffffffffffffff9c
RBP: 00007fb1acf15610 R08: 00000000000001e0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffe1b0ceb88 R14: 0000000000000001 R15: 0000000000000001
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/11/11 13:24 upstream ac347a0655db 6d6dbf8a .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root WARNING in squashfs_read_data
2023/11/11 13:01 upstream ac347a0655db 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in squashfs_read_data
* Struck through repros no longer work on HEAD.