From: Yue Hu <zbestahu@gmail.com>
To: Gao Xiang <hsiangkao@linux.alibaba.com>
Cc: bugreport@ubisectech.com, Yue Hu <huyue2@coolpad.com>,
linux-erofs@lists.ozlabs.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] erofs: fix inconsistent per-file compression format
Date: Sun, 14 Jan 2024 15:18:27 +0800 [thread overview]
Message-ID: <20240114151827.000069d6.zbestahu@gmail.com> (raw)
In-Reply-To: <20240113150602.1471050-1-hsiangkao@linux.alibaba.com>
On Sat, 13 Jan 2024 23:06:02 +0800
Gao Xiang <hsiangkao@linux.alibaba.com> wrote:
> EROFS can select compression algorithms on a per-file basis, and each
> per-file compression algorithm needs to be marked in the on-disk
> superblock for initialization.
>
> However, syzkaller can generate inconsistent crafted images that use
> an unsupported algorithmtype for specific inodes, e.g. use MicroLZMA
> algorithmtype even it's not set in `sbi->available_compr_algs`. This
> can lead to an unexpected "BUG: kernel NULL pointer dereference" if
> the corresponding decompressor isn't built-in.
>
> Fix this by checking against `sbi->available_compr_algs` for each
> m_algorithmformat request. Incorrect !erofs_sb_has_compr_cfgs preset
> bitmap is now fixed together since it was harmless previously.
>
> Reported-by: <bugreport@ubisectech.com>
> Fixes: 8f89926290c4 ("erofs: get compression algorithms directly on mapping")
> Fixes: 622ceaddb764 ("erofs: lzma compression support")
> Reviewed-by: Yue Hu <huyue2@coolpad.com>
> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
LGTM.
Reviewed-by: Yue Hu <huyue2@coolpad.com>
prev parent reply other threads:[~2024-01-14 7:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1affdad9-20f1-4fca-95af-237fda3df2b1.bugreport@ubisectech.com>
2023-12-27 4:17 ` [PATCH] erofs: fix inconsistent per-file compression format Gao Xiang
2023-12-27 5:06 ` [PATCH v2] " Gao Xiang
2023-12-28 2:00 ` Yue Hu
2024-01-13 15:06 ` [PATCH v3] " Gao Xiang
2024-01-14 7:18 ` Yue Hu [this message]
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=20240114151827.000069d6.zbestahu@gmail.com \
--to=zbestahu@gmail.com \
--cc=bugreport@ubisectech.com \
--cc=hsiangkao@linux.alibaba.com \
--cc=huyue2@coolpad.com \
--cc=linux-erofs@lists.ozlabs.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).