linux/drivers/firmware/efi
Andrzej Zaborowski a6d4b786eb efi-pstore: Fix an overflow on 32-bit builds
commit 783ee43118 upstream.

In generic_id the long int timestamp is multiplied by 100000 and needs
an explicit cast to u64.

Without that the id in the resulting pstore filename is wrong and
userspace may have problems parsing it, but more importantly files in
pstore can never be deleted and may fill the EFI flash (brick device?).
This happens because when generic pstore code wants to delete a file,
it passes the id to the EFI backend which reinterpretes it and a wrong
variable name is attempted to be deleted.  There's no error message but
after remounting pstore, deleted files would reappear.

Signed-off-by: Andrew Zaborowski <andrew.zaborowski@intel.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2014-06-30 20:14:04 -07:00
..
cper.c Move cper.c from drivers/acpi/apei to drivers/firmware/efi 2013-10-31 11:27:04 -07:00
efi-pstore.c efi-pstore: Fix an overflow on 32-bit builds 2014-06-30 20:14:04 -07:00
efi-stub-helper.c efi: Pass correct file handle to efi_file_{read,close} 2014-04-10 21:20:03 +01:00
efi.c efi: Use NULL instead of 0 for pointer 2014-03-04 16:17:20 +00:00
efivars.c efi: Use NULL instead of 0 for pointer 2014-03-04 16:17:20 +00:00
Kconfig Linux 3.13-rc7 2014-01-05 12:34:29 +01:00
Makefile Linux 3.13-rc7 2014-01-05 12:34:29 +01:00
runtime-map.c efi: Export EFI runtime memory mapping to sysfs 2013-12-21 15:29:36 +00:00
vars.c efivars, efi-pstore: Hold off deletion of sysfs entry until the scan is completed 2013-11-28 20:16:55 +00:00