From: syzbot <syzbot+32d3767580a1ea339a81@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] [PATCH] test warning in squashfs_read_data
Date: Wed, 15 Nov 2023 17:14:49 -0800 [thread overview]
Message-ID: <000000000000085ad3060a3abf6a@google.com> (raw)
In-Reply-To: <0000000000000526f2060a30a085@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] test warning in squashfs_read_data
Author: lizhi.xu@windriver.com
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ac347a0655db
diff --git a/fs/squashfs/block.c b/fs/squashfs/block.c
index 581ce9519339..cf21494e3994 100644
--- a/fs/squashfs/block.c
+++ b/fs/squashfs/block.c
@@ -330,6 +330,12 @@ int squashfs_read_data(struct super_block *sb, u64 index, int length,
if (next_index)
*next_index = index + length;
+ printk("l:%d, i: %d, ol: %d, mbu: %d, %s\n", length, index, output->length,
+ msblk->bytes_used, __func__);
+ if (!length) {
+ res = -EIO;
+ goto out;
+ }
res = squashfs_bio_read(sb, index, length, &bio, &offset);
if (res)
goto out;
next prev parent reply other threads:[~2023-11-16 1:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-15 13:10 [syzbot] [squashfs?] WARNING in squashfs_read_data syzbot
2023-11-16 1:14 ` syzbot [this message]
2023-11-16 3:13 ` [PATCH] squashfs: squashfs_read_data need to check if the length is 0 Lizhi Xu
2023-11-16 15:47 ` Phillip Lougher
2023-11-16 21:43 ` Andrew Morton
2023-11-17 2:17 ` Phillip Lougher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=000000000000085ad3060a3abf6a@google.com \
--to=syzbot+32d3767580a1ea339a81@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.