execve05: add exit call when execve failed
PATCH v2 1/1 execve05: add exit call when execve failed
From: Yeguojin <[email protected]>
When execve_child loses its executable permission due to other exceptions, execve05 will degenerate into a fork bomb, which will then exhaust system resources and cause other system exceptions.
--- testcases/kernel/syscalls/execve/execve05.c | 1 + 1 file changed, 1 insertion(+)
testcases/kernel/syscalls/execve/execve05.c +1 -0
@@ -39,6 +39,7 @@ static void do_child(void)TEST (execve (TEST_APP , argv, environ));tst_res (TFAIL |TTERRNO ,"execve() returned unexpected errno" ); +exit (EXIT_SUCCESS ); }static void verify_execve (void )
Signature · 5 lines
2.34.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Yeguojin,
Quoted 1 line · Yeguojin
execve05: add exit call when execve failed
Verdict: Reviewed
---
Pre-existing issues:
testcases/kernel/syscalls/execve/execve05.c
* This tests the functionality of the execve(2) :manpage:execve(2) call by spawning
The plain "execve(2)" and the :manpage: role are duplicated on the same line. The raw "execve(2)" text should be removed, leaving only the :manpage: role.
---
Note:
The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp