mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
6c6938d1e2
Replace the popen() call to the external tool sha256sum with OpenSSL's SHA256 digest algorithm to compute the checksum of a dump image to improve security of NGDump. The call to popen() is inherently insecure because a malicious user controlling a dump device could manipulate the latter and let the user applying zgetdump to the dump device execute arbitrary shell code. Furthermore, getting rid of process and shell spawning performed by popen() shall improve performance of calculation of dump image checksums. Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com> Reviewed-by: Mikhail Zaslonko <zaslonko@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
16 KiB
16 KiB