@@ -454,10 +454,14 @@ static void run(void)
}
SAFE_WAITPID(pid, &status, 0);
- if (WIFSIGNALED(status) && WTERMSIG(status) == SIGSEGV)
+ if (WIFSIGNALED(status) && WTERMSIG(status) == SIGSEGV) {
tst_res(TFAIL, "corrupted NMI stack");
- else if (WIFEXITED(status) && WEXITSTATUS(status) != 0)
+ } else if (WIFSIGNALED(status)) {
+ tst_res(TFAIL, "Child killed by unexpected signal %s",
+ tst_strsig(WTERMSIG(status)));
+ } else if (WIFEXITED(status) && WEXITSTATUS(status) != 0) {
tst_res(WEXITSTATUS(status), "Propogate child status");
+ }
}
static struct tst_test test = {
The test expects the child process to either be killed by SIGSEGV, or cleanly exit. If the child gets killed by unexpected signal, the parent process will fail to report any result. Fix the rare corner case. Signed-off-by: Martin Doucha <mdoucha@suse.cz> --- testcases/cve/cve-2015-3290.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)