From 37cfa707b08a6d8c060d7fdebf2cc255e1de8908 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Tue, 11 Oct 2022 13:07:59 +0100 Subject: [PATCH] Fix elf/tst-tls20 stack OOB access Off-by-one error found on morello with strict stack bounds. --- elf/tst-tls20.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elf/tst-tls20.c b/elf/tst-tls20.c index ce4635eeb1a..3e94590a001 100644 --- a/elf/tst-tls20.c +++ b/elf/tst-tls20.c @@ -342,7 +342,7 @@ do_test_invalid_dependency (bool bind_now) xdlclose (moddep); } - for (int n = 1; n <= nmods; n++) + for (int n = 1; n < nmods; n++) if (mods[n] != 0) unload_mod (n); } -- 2.47.2