]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
efivarfs: Ensure VariableName is NUL-terminated
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Thu, 2 Apr 2015 07:39:00 +0000 (08:39 +0100)
committerSasha Levin <sasha.levin@oracle.com>
Sun, 28 Jun 2015 17:39:26 +0000 (13:39 -0400)
commitccf63e05bb863b7cc821fb4e1429f0a4e7ed1686
tree6ffdd137c4dbb1e92f7bfb0bdf7a8e497eeff29b
parentba8e7f8c53394b2386e6bd55e487780480f6e0aa
efivarfs: Ensure VariableName is NUL-terminated

[ Upstream commit c57dcb566d3d866a302a1da2e06344bec31d5bcd ]

Some buggy firmware implementations update VariableNameSize on success
such that it does not include the final NUL character which results in
garbage in the efivarfs name entries.  Use kzalloc on the efivar_entry
(as is done in efivars.c) to ensure that the name is always
NUL-terminated.

The buggy firmware is:
BIOS Information
        Vendor: Intel Corp.
        Version: S1200RP.86B.02.02.0005.102320140911
        Release Date: 10/23/2014
        BIOS Revision: 4.6
System Information
        Manufacturer: Intel Corporation
        Product Name: S1200RP_SE

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Acked-by: Matthew Garrett <mjg59@coreos.com>
Cc: Jeremy Kerr <jk@ozlabs.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
fs/efivarfs/super.c