Linux RAID subsystem development
 help / color / mirror / Atom feed
From: "yu kuai" <yukuai@fygo.io>
To: "Chandradhar Kumar" <chandradhar.2003@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+a32ff75e417c0f49a8e9@syzkaller.appspotmail.com>
Subject: Re: [PATCH v3] md/raid0: validate device count before allocating devlist
Date: Sat, 12 Sep 2026 11:50:19 +0800	[thread overview]
Message-ID: <2ab91209-d26b-402a-abed-952b6ddfbda2@fygo.io> (raw)
In-Reply-To: <20260907132936.6677-1-chandradhar.2003@gmail.com>

在 2026/9/7 21:29, Chandradhar Kumar 写道:

> create_strip_zones() allocates conf->devlist based on mddev->raid_disks
> before verifying that number of devices matches raid_disks. Move the
> existing device count validation before allocation to reject invalid
> configurations before attempting a potentially excessive allocation.
>
> Fixes: 078d1d8e688d ("md/raid0: use kvzalloc/kvfree for strip_zone and devlist allocations")
> Reported-by:syzbot+a32ff75e417c0f49a8e9@syzkaller.appspotmail.com
> Closes:https://syzbot.org/bug?extid=a32ff75e417c0f49a8e9
> Signed-off-by: Chandradhar Kumar<chandradhar.2003@gmail.com>
> ---
> v2 -> v3:
> - Move the existing device count validation before the allocation
> - Add the requested fixes tag
>
> v1:https://lore.kernel.org/all/20260906143928.105165-1-chandradhar.2003@gmail.com/
> v2:https://lore.kernel.org/all/20260906184406.2141-1-chandradhar.2003@gmail.com/
>
>   drivers/md/raid0.c | 16 +++++++++++-----
>   1 file changed, 11 insertions(+), 5 deletions(-)
Applied to md-7.3

-- 
Thanks,
Kuai

      reply	other threads:[~2026-09-12  3:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-07 13:29 [PATCH v3] md/raid0: validate device count before allocating devlist Chandradhar Kumar
2026-09-12  3:50 ` 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=2ab91209-d26b-402a-abed-952b6ddfbda2@fygo.io \
    --to=yukuai@fygo.io \
    --cc=chandradhar.2003@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=magiclinan@didiglobal.com \
    --cc=song@kernel.org \
    --cc=syzbot+a32ff75e417c0f49a8e9@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