alistair23-linux/drivers/firmware
Matt Fleming 47f531e8ba efivarfs: Validate filenames much more aggressively
The only thing that efivarfs does to enforce a valid filename is
ensure that the name isn't too short. We need to strongly sanitise any
filenames, not least because variable creation is delayed until
efivarfs_file_write(), which means we can't rely on the firmware to
inform us of an invalid name, because if the file is never written to
we'll never know it's invalid.

Perform a couple of steps before agreeing to create a new file,

  * hex_to_bin() returns a value indicating whether or not it was able
    to convert its arguments to a binary representation - we should
    check it.

  * Ensure that the GUID portion of the filename is the correct length
    and format.

  * The variable name portion of the filename needs to be at least one
    character in size.

Reported-by: Lingzhu Xiang <lxiang@redhat.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Jeremy Kerr <jeremy.kerr@canonical.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-02-12 12:41:49 +00:00
..
google firmware: google: fix gsmi.c build warning 2011-12-09 16:23:49 -08:00
dcdbas.c Drivers: misc: remove __dev* attributes. 2013-01-03 15:57:16 -08:00
dcdbas.h
dell_rbu.c
dmi-id.c
dmi-sysfs.c
dmi_scan.c efi: Make 'efi_enabled' a function to query EFI facilities 2013-01-30 11:51:59 -08:00
edd.c
efivars.c efivarfs: Validate filenames much more aggressively 2013-02-12 12:41:49 +00:00
iscsi_ibft.c switch ->is_visible() to returning umode_t 2012-01-03 22:54:55 -05:00
iscsi_ibft_find.c efi: Make 'efi_enabled' a function to query EFI facilities 2013-01-30 11:51:59 -08:00
Kconfig ASoC: Move SigmaDSP firmware loader to ASoC 2011-11-29 12:01:10 +00:00
Makefile ASoC: Move SigmaDSP firmware loader to ASoC 2011-11-29 12:01:10 +00:00
memmap.c firmware/memmap: avoid type conflicts with the generic memmap_init() 2012-10-19 14:07:47 -07:00
pcdp.c pcdp: use early_ioremap/early_iounmap to access pcdp table 2012-07-30 17:25:11 -07:00
pcdp.h