From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+5a398eb460ddaa6f242f@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [erofs?] KASAN: global-out-of-bounds Read in z_erofs_decompress_queue
Date: Sat, 23 Aug 2025 09:22:11 +0800 [thread overview]
Message-ID: <tencent_2FB36AA36D497403B5E44E9764F76BA6DC05@qq.com> (raw)
In-Reply-To: <68a8bd20.050a0220.37038e.005a.GAE@google.com>
#syz test
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index 2d73297003d2..085fa0685a57 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -762,6 +762,10 @@ static int z_erofs_register_pcluster(struct z_erofs_frontend *fe)
pcl->from_meta = map->m_flags & EROFS_MAP_META;
fe->mode = Z_EROFS_PCLUSTER_FOLLOWED;
+ if (pcl->algorithmformat >= Z_EROFS_COMPRESSION_MAX) {
+ err = -EINVAL;
+ goto out;
+ }
/*
* lock all primary followed works before visible to others
* and mutex_trylock *never* fails for a new pcluster.
@@ -796,6 +800,7 @@ static int z_erofs_register_pcluster(struct z_erofs_frontend *fe)
err_out:
mutex_unlock(&pcl->lock);
+out:
z_erofs_free_pcluster(pcl);
return err;
}
next prev parent reply other threads:[~2025-08-23 1:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-22 18:55 syzbot
2025-08-22 19:46 ` syzbot
2025-08-23 0:53 ` Edward Adam Davis
2025-08-23 1:09 ` syzbot
2025-08-23 1:22 ` Edward Adam Davis [this message]
2025-08-23 1:53 ` syzbot
2025-08-23 1:53 ` [PATCH] erofs: Prohibit access to excessive algorithmformat Edward Adam Davis
2025-08-23 9:40 ` Gao Xiang
2025-08-23 9:37 ` [syzbot] [erofs?] KASAN: global-out-of-bounds Read in z_erofs_decompress_queue Gao Xiang
2025-08-23 10:07 ` syzbot
2025-08-25 8:30 ` Gao Xiang
2025-08-25 10:57 ` syzbot
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=tencent_2FB36AA36D497403B5E44E9764F76BA6DC05@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+5a398eb460ddaa6f242f@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®