Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
netdump: fix regression for raw RAM dumpfiles
Commit f42db6a ("Support core files with "unusual" layout") increased the minimal file size from MIN_NETDUMP_ELF_HEADER_SIZE to SAFE_NETDUMP_ELF_HEADER_SIZE which can lead to crash rejecting raw RAM dumpfiles. Without the patch, the crash fails to start a session with the error message: /var/tmp/ramdump_elf_XXXXXX: ELF header read: No such file or directory crash: malformed ELF file: /var/tmp/ramdump_elf_XXXXXX Fix that by erroring out only if we get less than MIN_NETDUMP_ELF_HEADER_SIZE bytes. Signed-off-by: Qianli Zhao <zhaoqianli@xiaomi.com> Acked-and-tested-by: Mathias Krause <minipli@grsecurity.net>
- Loading branch information