From: Svyatoslav Nikolenko <nsvatoslav515@gmail.com>
To: song@kernel.org, yukuai@fygo.io
Cc: magiclinan@didiglobal.com, xiao@kernel.org,
linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org,
Svyatoslav Nikolenko <nsvatoslav515@gmail.com>,
syzbot+75d7e96ad03ac2dbbd9f@syzkaller.appspotmail.com
Subject: [PATCH] md/raid5-ppl: check for NULL ppl_conf in ppl_write_stripe_run()
Date: Thu, 24 Sep 2026 19:26:10 +0300 [thread overview]
Message-ID: <20260924162610.10056-1-nsvatoslav515@gmail.com> (raw)
Syzbot reported a general protection fault
due to a NULL pointer dereference in ppl_write_stripe_run().
When a RAID 5 array operates without Partial Parity Log (PPL) enabled or
before its initialization, conf->log_private remains NULL.
ppl_write_stripe_run() assigns ppl_conf = conf->log_private and
immediately attempts to access ppl_conf->count in the loop header.
This triggers a NULL pointer dereference.
Fix this by returning early
from ppl_write_stripe_run() if ppl_conf is NULL.
Tested-by: syzbot+75d7e96ad03ac2dbbd9f@syzkaller.appspotmail.com
Reported-by: syzbot+75d7e96ad03ac2dbbd9f@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=75d7e96ad03ac2dbbd9f
Fixes: 3418d036c81d ("raid5-ppl: Partial Parity Log write logging implementation")
Signed-off-by: Svyatoslav Nikolenko <nsvatoslav515@gmail.com>
---
drivers/md/raid5-ppl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/md/raid5-ppl.c b/drivers/md/raid5-ppl.c
index 7f8a9d3fd578..e54ed4e44b0f 100644
--- a/drivers/md/raid5-ppl.c
+++ b/drivers/md/raid5-ppl.c
@@ -535,6 +535,9 @@ void ppl_write_stripe_run(struct r5conf *conf)
struct ppl_log *log;
int i;
+ if (!ppl_conf)
+ return;
+
for (i = 0; i < ppl_conf->count; i++) {
log = &ppl_conf->child_logs[i];
--
2.47.3
reply other threads:[~2026-09-24 16:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260924162610.10056-1-nsvatoslav515@gmail.com \
--to=nsvatoslav515@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=magiclinan@didiglobal.com \
--cc=song@kernel.org \
--cc=syzbot+75d7e96ad03ac2dbbd9f@syzkaller.appspotmail.com \
--cc=xiao@kernel.org \
--cc=yukuai@fygo.io \
/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®