Linux RAID subsystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/2] md/raid5: validate disk count before reshape assembly
@ 2026-09-21  7:16 Chen Cheng
  2026-09-21  7:16 ` [PATCH v2 1/2] md/raid5: extract min_raid_disks() Chen Cheng
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chen Cheng @ 2026-09-21  7:16 UTC (permalink / raw)
  To: yukuai, nixiao, linux-raid; +Cc: chencheng

From: Chen Cheng <chencheng@fnnas.com>

The previous patch rejects raid4/5 arrays with too few disks in
setup_conf(). During reshape assembly, raid5_run() still divides by the
data-disk count before that check, so a crafted superblock can hit
division by zero.

Extract min_raid_disks() and reject invalid reshape geometries in
raid5_run() first.

v1 -> v2:
- Added Link

Chen Cheng (2):
  md/raid5: extract min_raid_disks()
  md/raid5: reject invalid reshape disks in raid5_run()

 drivers/md/raid5.c | 28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)

-- 
2.55.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-22  7:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-21  7:16 [PATCH v2 0/2] md/raid5: validate disk count before reshape assembly Chen Cheng
2026-09-21  7:16 ` [PATCH v2 1/2] md/raid5: extract min_raid_disks() Chen Cheng
2026-09-21  7:16 ` [PATCH v2 2/2] md/raid5: reject invalid reshape disks in raid5_run() Chen Cheng
2026-09-22  7:23 ` [PATCH v2 0/2] md/raid5: validate disk count before reshape assembly yu kuai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox