DF-2445
strncpy of uuid without guaranteed NUL termination
Summary
dm_dev_alloc copies caller-supplied uuid with strncpy into dmv->uuid[DM_UUID_LEN](129 bytes). If supplied uuid >=129 bytes strncpy leaves buffer with no NUL terminator. name uses strlcpy (safe always NUL-terminated) but uuid uses strncpy. uuid originates from user-controlled proplib no length check. dm_dev_lookup_uuid does strcmp dm_dev_status_ioctl does prop_dictionary_set_cstring both strlen/strcmp the field. Currently kmalloc(M_ZERO) zeroed padding at end of struct masks runaway read. Latent OOB-read/kernel-heap info leak: future struct change placing non-zero field adjacent to uuid or non-zeroed allocation turns this into info leak defeating KASLR.
No comments yet.