From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 2276D385E012; Wed, 26 Oct 2022 14:50:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2276D385E012 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666795840; bh=Y8aYzqmBk+Pyk9vevUPr6yi7gUVG+8VpUgQi5czI5vI=; h=From:To:Subject:Date:From; b=aVJf2s3wX0IeEAlFnz33K6qUiapuJYjY+R7ds31QSSvk4iI/Z0FsmQInGp1IWYej/ IJVkdJ9KeNn4ydSAUbdp01K30zLPrgkDcYf94znyL64GhIP9a6gWTna0dOBo0vXEZI 49736MRDzq7uib0KoGiWt/KLIYbF3jwuFvq5R+4k= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Szabolcs Nagy To: glibc-cvs@sourceware.org Subject: [glibc/arm/morello/main] Fix elf/tst-tls20 stack OOB access X-Act-Checkin: glibc X-Git-Author: Szabolcs Nagy X-Git-Refname: refs/heads/arm/morello/main X-Git-Oldrev: 8a4566d712a70a7e3f33cfdb0590897d84788529 X-Git-Newrev: 829e179a524f6c67c1b7ed48ebcdcd01e3cbf3d4 Message-Id: <20221026145040.2276D385E012@sourceware.org> Date: Wed, 26 Oct 2022 14:50:40 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=829e179a524f6c67c1b7ed48ebcdcd01e3cbf3d4 commit 829e179a524f6c67c1b7ed48ebcdcd01e3cbf3d4 Author: Szabolcs Nagy Date: Tue Oct 11 13:07:59 2022 +0100 Fix elf/tst-tls20 stack OOB access Off-by-one error found on morello with strict stack bounds. Diff: --- elf/tst-tls20.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elf/tst-tls20.c b/elf/tst-tls20.c index ce4635eeb1..9cebe22a40 100644 --- a/elf/tst-tls20.c +++ b/elf/tst-tls20.c @@ -264,7 +264,7 @@ do_test_dependency (void) xdlclose (moddep); } - for (int n = 1; n <= nmods; n++) + for (int n = 1; n < nmods; n++) if (mods[n] != 0) unload_mod (n); } @@ -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); }