summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorClemens Lang via Gcrypt-devel <gcrypt-devel@lists.gnupg.org>2022-02-14 18:49:59 +0100
committerNIIBE Yutaka <gniibe@fsij.org>2022-02-15 18:45:31 +0900
commitbeb5d6df5c5785db7c32a24a5d2a351cb964bfbc (patch)
treee4df9e17ca7790c2cf872cf9caf219ca9a7e6b50 /configure.ac
parentbff9f1b024647e18b2c87dcd769c0e449f7752e6 (diff)
downloadlibgcrypt-beb5d6df5c5785db7c32a24a5d2a351cb964bfbc.tar.gz
fips: Use ELF header to find hmac file offset
* src/fips.c [ENABLE_HMAC_BINARY_CHECK] (hmac256_check): Use ELF headers to locate the file offset for the HMAC in addition to information from the loader -- The previous method of locating the offset of the .rodata1 section in the ELF file on disk used information obtained from the loader. This computed the address of the value in memory at runtime, but the offset in the file can be different. Specifically, the old code computed a value relative to ElfW(Phdr).p_vaddr, but the offset in the file is relative to ElfW(Phdr).p_offset. These values can differ, so the computed address at runtime must be translated into a file offset relative to p_offset. This is largely cosmetic, since the text section that should contain the HMAC usually has both p_vaddr and p_offset set to 0. Signed-off-by: Clemens Lang <cllang@redhat.com>
Diffstat (limited to 'configure.ac')
0 files changed, 0 insertions, 0 deletions