From: "yu kuai" <yukuai@fygo.io>
To: "Svyatoslav Nikolenko" <nsvatoslav515@gmail.com>,
<song@kernel.org>, "yu kuai" <yukuai@fygo.io>
Cc: <magiclinan@didiglobal.com>, <xiao@kernel.org>,
<linux-raid@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<syzbot+270624bb31d478afe62e@syzkaller.appspotmail.com>
Subject: Re: [PATCH] md/raid5: fix NULL pointer dereference in raid5_has_ppl
Date: Wed, 23 Sep 2026 19:23:45 +0800 [thread overview]
Message-ID: <314ed63c-e29b-4fa0-9f24-57b5f868fab6@fygo.io> (raw)
In-Reply-To: <20260922125418.2715-1-nsvatoslav515@gmail.com>
Hi,
在 2026/9/22 20:54, Svyatoslav Nikolenko 写道:
> Check if conf->mddev is non-NULL in raid5_has_ppl() before testing flags to
> prevent a KASAN null-ptr-deref during free_conf() cleanup paths.
>
> Reported-by: syzbot+270624bb31d478afe62e@syzkaller.appspotmail.com
> Tested-by: syzbot+270624bb31d478afe62e@syzkaller.appspotmail.com
> Signed-off-by: Svyatoslav Nikolenko <nsvatoslav515@gmail.com>
> ---
> drivers/md/raid5-log.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Looks like this is already fixed by:
https://patch.msgid.link/20260915081731.122933-1-chengzhihao1@huawei.com
>
> diff --git a/drivers/md/raid5-log.h b/drivers/md/raid5-log.h
> index c8332502669e..5a144051b142 100644
> --- a/drivers/md/raid5-log.h
> +++ b/drivers/md/raid5-log.h
> @@ -51,7 +51,7 @@ static inline bool raid5_has_log(struct r5conf *conf)
>
> static inline bool raid5_has_ppl(struct r5conf *conf)
> {
> - return test_bit(MD_HAS_PPL, &conf->mddev->flags);
> + return conf->mddev && test_bit(MD_HAS_PPL, &conf->mddev->flags);
> }
>
> static inline int log_stripe(struct stripe_head *sh, struct stripe_head_state *s)
--
Thanks,
Kuai
prev parent reply other threads:[~2026-09-23 11:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 12:54 Svyatoslav Nikolenko
2026-09-23 11:23 ` yu kuai [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=314ed63c-e29b-4fa0-9f24-57b5f868fab6@fygo.io \
--to=yukuai@fygo.io \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=magiclinan@didiglobal.com \
--cc=nsvatoslav515@gmail.com \
--cc=song@kernel.org \
--cc=syzbot+270624bb31d478afe62e@syzkaller.appspotmail.com \
--cc=xiao@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
all inboxes | Powered by JetHome®