On Tue, 2013-01-29 at 13:46 +0800, Lingzhu Xiang wrote:
> So I create a file with upper case GUID string, but the upper and lower case
> are parsed to be the same binary value and saved separately in sysfs. During
> remount, the binary GUID is formatted to lower case, so the upper and lower
> case sysfs entries come back to efivarfs with the same name.
>
> This is just trying to explore the impact of not having GUID validation for
> filename. Not something new.
There are two problems with the way filenames are validated currently.
We don't validate the GUID portion at all, which was demonstrated when
you created a file in efivarfs with a filename of,
test-------------------------------------
Also, we're using the simple dentry operations which has a
case-sensitive d_compare. While the first portion of the filename, the
variable name, is case-sensitive, the GUID part isn't. And that's the
bug that allowed you to create two files with the same GUID, one
uppercase, one lowercase.
I'll take a look at fixing this. Thanks for the report.
--
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html