[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260114-fortify-improve-handling-of-tempfile-v2-2-63b86c4dbd0e@kernel.org>
Date: Wed, 14 Jan 2026 14:57:15 +0100
From: Nicolas Schier <nsc@...nel.org>
To: Kees Cook <kees@...nel.org>
Cc: linux-hardening@...r.kernel.org, linux-kbuild@...r.kernel.org,
linux-kernel@...r.kernel.org, Nicolas Schier <nsc@...nel.org>,
WangYuli <wangyuli@...c.io>, Nathan Chancellor <nathan@...nel.org>
Subject: [PATCH v2 2/2] fortify: Cleanup temp file also on non-successful
exit
Ensure cleanup of test_fortify.sh's temporary file also on script
interruption, or some common signals.
Reported-by: WangYuli <wangyuli@...c.io>
Closes: https://lore.kernel.org/linux-kbuild/20251112114725.287349-1-wangyuli@aosc.io/
Reviewed-by: Nathan Chancellor <nathan@...nel.org>
Reviewed-by: WangYuli <wangyuli@...c.io>
Signed-off-by: Nicolas Schier <nsc@...nel.org>
---
lib/test_fortify/test_fortify.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/test_fortify/test_fortify.sh b/lib/test_fortify/test_fortify.sh
index 368d07d9acbf737be376756b39def87f12f4e9bf..ad6dd44fa31c0ad3a063cd0caab3a4664f9f3f31 100644
--- a/lib/test_fortify/test_fortify.sh
+++ b/lib/test_fortify/test_fortify.sh
@@ -29,7 +29,7 @@ shift
__cleanup() {
rm -f "$TMP"
}
-trap __cleanup EXIT
+trap __cleanup EXIT HUP INT QUIT TERM
# Function names in warnings are wrapped in backticks under UTF-8 locales.
# Run the commands with LANG=C so that grep output will not change.
--
2.47.3
Powered by blists - more mailing lists