]> git.proxmox.com Git - mirror_edk2.git/commit
SecurityPkg: Fix assert when setting key from eMMC/SD/USB
authorRoman Bacik <roman.bacik@broadcom.com>
Tue, 10 Jul 2018 22:51:05 +0000 (15:51 -0700)
committerLaszlo Ersek <lersek@redhat.com>
Thu, 12 Jul 2018 21:33:56 +0000 (23:33 +0200)
commit79b10d4ce4f08aab4b9548fabc4542ca78a96247
treed2455a9deb257a1d9ee9bf3ef0d6aec78fb8dafa
parent0a563f3fecfd9baffe8dce51bb4411d6a748a936
SecurityPkg: Fix assert when setting key from eMMC/SD/USB

When secure boot is enabled, if one loads keys from a FAT formatted
eMMC/SD/USB when trying to provision PK/KEK/DB keys via the menu,
an assert in StrLen() occurs.
This is because the filename starts on odd address, which is not a uint16
aligned boundary: https://bugzilla.tianocore.org/show_bug.cgi?id=1003

There are further known issues with the OpenFileByDevicePath() function;
those are tracked by
<https://bugzilla.tianocore.org/show_bug.cgi?id=1008>.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Roman Bacik <roman.bacik@broadcom.com>
Reviewed-by: "Yao, Jiewen" <jiewen.yao@intel.com>
[lersek@redhat.com: whitespace fixes]
[lersek@redhat.com: reference TianoCore BZ#1008]
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigFileExplorer.c