From: syzbot <syzbot+270624bb31d478afe62e@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Forwarded: [PATCH] md/raid5: fix NULL pointer dereference in raid5_has_ppl
Date: Tue, 22 Sep 2026 05:05:05 -0700 [thread overview]
Message-ID: <6ab26ef1.a6af0033.177e91.001e.GAE@google.com> (raw)
In-Reply-To: <6ab1bc3f.a6af0033.177e91.001a.GAE@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: [PATCH] md/raid5: fix NULL pointer dereference in raid5_has_ppl
Author: nsvatoslav515@gmail.com
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.
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f0100363d8c3
Signed-off-by: Svyatoslav Nikolenko <nsvatoslav515@gmail.com>
---
drivers/md/raid5-log.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
--
2.47.3
prev parent reply other threads:[~2026-09-22 12:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 23:22 [syzbot] [raid?] BUG: unable to handle kernel paging request in free_conf syzbot
2026-09-22 12:05 ` syzbot [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=6ab26ef1.a6af0033.177e91.001e.GAE@google.com \
--to=syzbot+270624bb31d478afe62e@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
--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®