mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Check for bad device-mapper name early
There is no need to unlock keyslot if the provided name has wrong format. Let's check for length and '/' in name early. Note that other commands could accept path to the device as libdevmapper translate it to the name (status /dev/mapper/xxx). Add early check only to activate commands. It still can fail later because of mangled characters. Fixes: #893
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
#define DEFAULT_MEM_ALIGNMENT 4096
|
||||
|
||||
#define DM_UUID_LEN 129
|
||||
#define DM_NAME_LEN 128
|
||||
#define DM_BY_ID_PREFIX "dm-uuid-"
|
||||
#define DM_BY_ID_PREFIX_LEN 8
|
||||
#define DM_UUID_PREFIX "CRYPT-"
|
||||
|
||||
Reference in New Issue
Block a user