mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Before extracting a file trailer, check that the file is big enough; Check that signature length stored in the extracted trailer doesn't exceed the size of the file without the trailer. Treat the case of the failed checks as unsigned file. Without the checks, memcmp() may read the area before the allocated @buffer, dumping heap into bootmap or crashing. Reviewed-by: Stefan Haberland <sth@linux.ibm.com> Signed-off-by: Eduard Shishkin <edward6@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>