From ced5fa8b170ad448f4076e24a10c731b5cfb36ce Mon Sep 17 00:00:00 2001 From: Blazej Kucman Date: Fri, 3 Dec 2021 15:31:15 +0100 Subject: mdadm: block creation with long names This fixes buffer overflows in create_mddev(). It prohibits creation with not supported names for DDF and native. For IMSM, mdadm will do silent cut to 16 later. Signed-off-by: Mariusz Tkaczyk Signed-off-by: Blazej Kucman Signed-off-by: Jes Sorensen --- mdadm.8.in | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mdadm.8.in') diff --git a/mdadm.8.in b/mdadm.8.in index 28d773c2..68e100cb 100644 --- a/mdadm.8.in +++ b/mdadm.8.in @@ -2186,6 +2186,11 @@ is run, but will be created by .I udev once the array becomes active. +The max length md-device name is limited to 32 characters. +Different metadata types have more strict limitation +(like IMSM where only 16 characters are allowed). +For that reason, long name could be truncated or rejected, it depends on metadata policy. + As devices are added, they are checked to see if they contain RAID superblocks or filesystems. They are also checked to see if the variance in device size exceeds 1%. -- cgit v1.2.3