lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251128-fortify-improve-handling-of-tempfile-v1-2-a79d0d3abcac@kernel.org>
Date: Fri, 28 Nov 2025 20:27:58 +0100
From: Nicolas Schier <nsc@...nel.org>
To: Kees Cook <kees@...nel.org>
Cc: WangYuli <wangyuli@...c.io>, WangYuli <wangyl5933@...naunicom.cn>, 
 Nathan Chancellor <nathan@...nel.org>, linux-hardening@...r.kernel.org, 
 linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org, 
 Nicolas Schier <nsc@...nel.org>, Nicolas Schier <nicolas.schier@...ux.dev>, 
 Nicolas Schier <nicolas.schier@...ux.dev>
Subject: [PATCH 2/2] fortify: Cleanup temp file also on non-successful exit

From: Nicolas Schier <nicolas.schier@...ux.dev>

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/
Signed-off-by: Nicolas Schier <n.schier@....de>
---
 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 368d07d9acbf..ad6dd44fa31c 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.51.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ