summaryrefslogtreecommitdiff
path: root/Cryptlib/OpenSSL/crypto/mem_dbg.c
diff options
context:
space:
mode:
authorChris Coulson <chris.coulson@canonical.com>2021-02-20 20:34:55 +0000
committerPeter Jones <pjones@redhat.com>2021-02-25 11:14:07 -0500
commit9c48fc3e6493c885388371ffa56f6b9b18ce4c0b (patch)
tree20995f1ca583648383826ec6da4f8788bb6a7c3f /Cryptlib/OpenSSL/crypto/mem_dbg.c
parentc98a10c519e78c3c7abf727cf89dcbbf05fa1f4a (diff)
downloadefi-boot-shim-9c48fc3e6493c885388371ffa56f6b9b18ce4c0b.tar.gz
efi-boot-shim-9c48fc3e6493c885388371ffa56f6b9b18ce4c0b.zip
sbat: Don't assume VirtualSize == SizeOfRawData
The current code rejects the .sbat section if the VirtualSize and SizeOfRawData fields of the section header aren't the same, but this is too strict. The VirtualSize corresponds to the size of the SBAT metadata and isn't necessarily a multiple of the file alignment. The on-disk size (SizeOfRawData) is a multiple of the file alignment and is zero padded. Make sure that the on-disk size is at least as large as virtual size, and ignore the .sbat section if it isn't. This should fix https://github.com/rhboot/shim/issues/281. Signed-off-by: Chris Coulson <chris.coulson@canonical.com>
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/mem_dbg.c')
0 files changed, 0 insertions, 0 deletions