mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Edward Adam Davis <eadavis@qq.com>,
	syzbot+5a398eb460ddaa6f242f@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH] erofs: Prohibit access to excessive algorithmformat
Date: Sat, 23 Aug 2025 17:40:54 +0800	[thread overview]
Message-ID: <c93c3ae0-2e72-48b3-9faf-956fd6f1a3d4@linux.alibaba.com> (raw)
In-Reply-To: <tencent_FC33559E331B7F4BA91BB62522BA1CBB8C08@qq.com>

Hi,

On 2025/8/23 09:53, Edward Adam Davis wrote:
> syz reported a global-out-of-bounds Read in z_erofs_decompress_queue.
> 
> OOB occurs in z_erofs_decompress_queue() because algorithmformat is too
> large.
> 
> Added relevant checks when registering pcluster.
> 
> Reported-by: syzbot+5a398eb460ddaa6f242f@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=5a398eb460ddaa6f242f
> Tested-by: syzbot+5a398eb460ddaa6f242f@syzkaller.appspotmail.com
> Signed-off-by: Edward Adam Davis <eadavis@qq.com>

Your analysis is correct, but the fix should be applied to zmap.c
instead since it parses the on-disk map format. Also, it's actually
a regression out of new encoded extents since the old compress
indexes already has the check.

I've submitted a formal fix:
https://lore.kernel.org/r/20250823093018.3117864-1-hsiangkao@linux.alibaba.com

Thanks,
Gao Xiang

  reply	other threads:[~2025-08-23  9:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-22 18:55 [syzbot] [erofs?] KASAN: global-out-of-bounds Read in z_erofs_decompress_queue 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
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 [this message]
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=c93c3ae0-2e72-48b3-9faf-956fd6f1a3d4@linux.alibaba.com \
    --to=hsiangkao@linux.alibaba.com \
    --cc=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®