From: Eric Biggers <ebiggers@kernel.org>
To: Edward AD <twuufnxlz@gmail.com>
Cc: syzbot+9cf75dc581fb4307d6dd@syzkaller.appspotmail.com,
adilger.kernel@dilger.ca, krisman@collabora.com,
linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com,
tytso@mit.edu
Subject: Re: [PATCH] unicode: add s_encoding null ptr check in utf8ncursor
Date: Wed, 20 Sep 2023 12:37:06 -0700 [thread overview]
Message-ID: <20230920193706.GB914@sol.localdomain> (raw)
In-Reply-To: <20230920112015.829124-2-twuufnxlz@gmail.com>
On Wed, Sep 20, 2023 at 07:20:16PM +0800, Edward AD wrote:
> When init struct utf8cursor *u8c in utf8ncursor(), we need check um is
> valid.
>
> Reported-and-tested-by: syzbot+9cf75dc581fb4307d6dd@syzkaller.appspotmail.com
> Fixes: b81427939590 ("ext4: remove redundant checks of s_encoding")
> Signed-off-by: Edward AD <twuufnxlz@gmail.com>
> ---
> fs/unicode/utf8-norm.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/fs/unicode/utf8-norm.c b/fs/unicode/utf8-norm.c
> index 768f8ab448b8..906b639b2f38 100644
> --- a/fs/unicode/utf8-norm.c
> +++ b/fs/unicode/utf8-norm.c
> @@ -422,6 +422,10 @@ int utf8ncursor(struct utf8cursor *u8c, const struct unicode_map *um,
> {
> if (!s)
> return -1;
> +
> + if (IS_ERR_OR_NULL(um))
> + return -1;
> +
> u8c->um = um;
> u8c->n = n;
> u8c->s = s;
> --
See https://lore.kernel.org/linux-fsdevel/20230920073659.GC2739@sol.localdomain/
- Eric
next prev parent reply other threads:[~2023-09-20 19:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-20 5:25 [syzbot] [ext4?] general protection fault in utf8nlookup syzbot
2023-09-20 7:36 ` Eric Biggers
2023-09-20 11:20 ` [PATCH] unicode: add s_encoding null ptr check in utf8ncursor Edward AD
2023-09-20 19:37 ` Eric Biggers [this message]
2024-02-13 0:24 ` [syzbot] [ext4?] general protection fault in utf8nlookup syzbot
2024-02-13 10:42 ` Jan Kara
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=20230920193706.GB914@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=adilger.kernel@dilger.ca \
--cc=krisman@collabora.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+9cf75dc581fb4307d6dd@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=twuufnxlz@gmail.com \
--cc=tytso@mit.edu \
/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