aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/tls.h
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2022-11-04 20:28:09 +0000
committerMichael Brown <mcb30@ipxe.org>2022-11-04 20:28:09 +0000
commit7b60a487528a2b6dfa43da179f9ae9ef7ce34e76 (patch)
tree563e4ed718b82a369bd2fdf4709e350ca3be246e /src/include/ipxe/tls.h
parentf48b01cb016921cf0f58bd6be676c17042923719 (diff)
downloadipxe-7b60a487528a2b6dfa43da179f9ae9ef7ce34e76.tar.gz
[efi] Clear DMA-coherent buffers before mappingioactive
The DMA mapping is performed implicitly as part of the call to dma_alloc(). The current implementation creates the IOMMU mapping for the allocated and potentially uninitialised data before returning to the caller (which will immediately zero out or otherwise initialise the buffer). This leaves a small window within which a malicious PCI device could potentially attempt to retrieve firmware-owned secrets present in the uninitialised buffer. (Note that the hypothetically malicious PCI device has no viable way to know the address of the buffer from which to attempt a DMA read, rendering the attack extremely implausible.) Guard against any such hypothetical attacks by zeroing out the allocated buffer prior to creating the coherent DMA mapping. Suggested-by: Mateusz Siwiec <Mateusz.Siwiec@ioactive.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/tls.h')
0 files changed, 0 insertions, 0 deletions