Message ID | 728d38c0fe230ac671bd6c2589a11e56f0324644.1666877952.git.szabolcs.nagy@arm.com |
---|---|
State | Committed |
Commit | 6a3794ea917558776ba1a66a925f2d5e1dbf0724 |
Headers |
Return-Path: <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 70B0038245B9 for <patchwork@sourceware.org>; Thu, 27 Oct 2022 15:34:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 70B0038245B9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666884855; bh=HTQb2sYeaj8T7ms9Wq1bvJvYp+MjaqdJPaLfBbKMPS8=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=hvJ/mMvF9lzAZFuZW59LmWt1pPWcAmMV11n1gigW41C755w5R5O1Oo4nnlkA4sXTy UNan1bvuSJAQbraMn353emlb5N0+bFaVr9OTRNatmsFTXymT/f7w/GOQIbjJNw9w/0 yVPLPUMHwNvsLGmOt7x1o1zAMxJsWx0Y/XtWXGHw= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140049.outbound.protection.outlook.com [40.107.14.49]) by sourceware.org (Postfix) with ESMTPS id A0528381D455 for <libc-alpha@sourceware.org>; Thu, 27 Oct 2022 15:33:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A0528381D455 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=FQgjM3RlNyRsuZHEp3nttIkqOz6Z6R+yyVqWAniNBg7FSdPTtl77JmLbRNn4AEOiQJ3zZI7l2wehTKy3Ma/+sZJQNQJtfNjr9EvC0BlOUMX4ywRG2zed/iuO7VYRiei4V3I8hHLFxmc+7zNRXs3S5dL2AW663fFgPrk8KnTslwzxaUR/cpAFodYJRg4P1HZnOvUJ9kZR+hoc5O+LGKkodDb0heFpXvDouZQO9xAS0kc01oQB/NzrMbwQTfHElsVuGOM+IN0EipeEHNoDep1wr5DW+qjCXogj1Xb3YESenA6oDEwESkHp/gTrmgShwYjObHYJeFDFLAcDiSm4HMTi8Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HTQb2sYeaj8T7ms9Wq1bvJvYp+MjaqdJPaLfBbKMPS8=; b=elTh0agMprw/04IfIclhMaATRwxokhwJWoWnTLRfwX0S/Ym7lwA+9ZW90cx1i0Q9O3IZSQEJQcAjeAuA3tin/+mBkEnbVd9Ytutw+QO2q6FxPEyX76Fl8AfUM2xLeDiINevVbcaRd+g/etQ92j4CGOnkJGyO6A7B4fat4LuB/So82pgJ/FMCjwnYXTVBZIB3zHZFea74AljXgaghswA32hEL7/KKP3rxFksk5PGKAxW5630pKy7+t+HA9sbxV5u9ikQJVYVmL/FwwuuutdiIJVzvTVCRBWm+TAsv2Cyc4ytCsgRhx2HAa0vv7EEBf4eRSnMTWHBaM+pu4FC4kab+eA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1, 1, smtp.mailfrom=arm.com] dmarc=[1, 1, header.from=arm.com]) Received: from AS9PR06CA0632.eurprd06.prod.outlook.com (2603:10a6:20b:46f::6) by PAVPR08MB9793.eurprd08.prod.outlook.com (2603:10a6:102:31d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Thu, 27 Oct 2022 15:33:39 +0000 Received: from AM7EUR03FT064.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:46f:cafe::ef) by AS9PR06CA0632.outlook.office365.com (2603:10a6:20b:46f::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28 via Frontend Transport; Thu, 27 Oct 2022 15:33:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM7EUR03FT064.mail.protection.outlook.com (100.127.140.127) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.32 via Frontend Transport; Thu, 27 Oct 2022 15:33:39 +0000 Received: ("Tessian outbound 6c699027a257:v130"); Thu, 27 Oct 2022 15:33:39 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a8bdcff91ce8b5ef X-CR-MTA-TID: 64aa7808 Received: from 7b6747d549d3.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E8E33093-4D09-45DA-B933-59EA1A5BB95E.1; Thu, 27 Oct 2022 15:33:32 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 7b6747d549d3.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 15:33:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HtUxibvxSZZ9f5yzlzsMhFj1NIcJKUdVsslNk9vkQk2RLjaJEItMwMgsHTmclbKBMZWHcw1a9jacyqJRKHCfoALRvwX3d7pslvhUZHPskTiyfJA8TZiJ8TSIjBNTFcYYp5irHFs8AgKbPDzMe29yPvoibiQ9HT5KdiDWdDd4OCk2vam9qhblyDPA2lSWI8Rj7Fy58eMvSu9rxuO/ybDA2f2ch0/LjGd0tavapYvvI4Cg0+Olk/9azSRsKd8Mx5YHIFhulcUtth2kFYN3NqkmkRbX1/ip2DFNH7rtwv3zvomFnGqGm1R0YSelv/XaVB5mikDiMJLdyVaGTsaHloupxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HTQb2sYeaj8T7ms9Wq1bvJvYp+MjaqdJPaLfBbKMPS8=; b=cUtm8N1znB3OnY+0wjiJYBH6r1nQ/yKTYzmtQEDwmIsmzPfuii1u8u7zSK5uBZwJ1iSs2nwnr+KLFuTWgYt9PwQJnY/D2s6Mfr3TK20nxO2kkCpfM7NwSuvQJ6frFDCtPChL9Z958bxXAlWOaEdxFp1I0rS5etrQu8RMsKj79qucnEV2AxhzcONAeHzBD+WObspCNnGF549iVjSNcyc5Q5LF8r3dLdnBuzj2La3HC5JIItBSEE+Eq/iQWK5Bwh0JHWKBnyOgktBR92JXkTII2vaKqXdFNHP7QvV1ugwYNtSnwvKtvq4BfPkycUjlA04+7IcJ71ucVKjROWqoKOMURg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from DB6P18901CA0012.EURP189.PROD.OUTLOOK.COM (2603:10a6:4:16::22) by PAVPR08MB9505.eurprd08.prod.outlook.com (2603:10a6:102:315::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Thu, 27 Oct 2022 15:33:31 +0000 Received: from DBAEUR03FT052.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:16:cafe::cb) by DB6P18901CA0012.outlook.office365.com (2603:10a6:4:16::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28 via Frontend Transport; Thu, 27 Oct 2022 15:33:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT052.mail.protection.outlook.com (100.127.142.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 15:33:31 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 27 Oct 2022 15:33:31 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 27 Oct 2022 15:33:30 +0000 To: <libc-alpha@sourceware.org> Subject: [PATCH 15/20] Fix off-by-one OOB read in elf/tst-tls20 Date: Thu, 27 Oct 2022 16:33:30 +0100 Message-ID: <728d38c0fe230ac671bd6c2589a11e56f0324644.1666877952.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <cover.1666877952.git.szabolcs.nagy@arm.com> References: <cover.1666877952.git.szabolcs.nagy@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT052:EE_|PAVPR08MB9505:EE_|AM7EUR03FT064:EE_|PAVPR08MB9793:EE_ X-MS-Office365-Filtering-Correlation-Id: 97ee9985-2dde-47f5-729e-08dab8309f41 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: L3lPJaqjnY4SE/M7pF9YAAEWIaLUEGmmcYyZWWgqPbKCEwSVJqn0RmlUGFh906oCQlQRSfueL0peZFDbOfNMuvIlShF46Mo0XMMGiaqgMDPfnOJcPoDLpmMmLnjtQ/Z9dtb+hpbLQjvvKSIbKKmKgfgYhQlELRyI8C4Gq30rToZ9ynVStkwyAX0hpxGagWNdAFjZpRB/sbfygmkppMVHaa6or3vDQXoZ7OmivvtyQ9Ata1f6h/3nUSNlZ8CvzYVw87qU8f05exyRMxPzl1In7w0SqiVGys4z9/EIo/9dKdcYwx2MoYldHBOg/7JbHyerOwJzsyV4iqj2TCzT+oALRYgkFV/amn40Erl7MA+gbj6zEx1EIotGq6qJtAMrJNH2Ww2TVDvfkdO19lRJZXYXppopwgFsMxaBRIScucB5occvhRTkXofoNop1PlAGqoqbFhiCAqI92RfOzTTRExjFgFtgJRpReyA5IGg0UrxnUMdGHSxJAI31ls3adg3ce4f24J75U3zVUoNhKnz+2hcHY83zvLl3YMHHNB+oR3IKQsADbzD8jYZ3KBdTr2duh/MBp64CFmWx3PNGfMZlrT9Xt0BmozYsMVwP18bHlO8nndo6G+L9Ax9OKwn2829n/7Q5/LIN7TNTvOw5Vk+dAPgK44y4y+sCmr2RjQ5zTQCNPrxiF+3LeBnUAiki8NKHKH++wrZ8/3Osoc1rNHrNqAThfw4/cQOB8oxkgvjFbLH5q7zkIeJPYT8Xp/upSsYUTqvdYMU0d/nzOU6ZYtYSktNGCEtvdGGKEgdQQCGVVF4Ae0esk4TU+9R6msXVPW6vYeH9 X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(136003)(396003)(346002)(376002)(39860400002)(451199015)(46966006)(40470700004)(36840700001)(82310400005)(40480700001)(70206006)(8936002)(83380400001)(81166007)(6916009)(356005)(8676002)(36756003)(478600001)(41300700001)(26005)(4744005)(2906002)(5660300002)(36860700001)(44832011)(70586007)(336012)(40460700003)(186003)(47076005)(2616005)(86362001)(426003)(316002)(7696005)(82740400003)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9505 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 2e3b6569-520a-4ac8-018e-08dab8309a4a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0Dum5qnCBNRvYRjhJ/wsy7AZrSZWamMS/5jO3cJtkD5xcIG0+pFcLZ/KjGpwD5xmamJHJFU3Kg3i82DcruApAHhi8YGBGc1m+kkIGFHjIuTkr//qFyegYwy/pnq7h3UeZ4BD4Eh7bi2j+xS9jbUHjhsvu4mcZC/Va5Q5BIf1aKs/B73+fZ4SLkl1/vwGRpvtKitiOZ4nn0fT45Q7Tapgu9oEKL5P9ik6wvlgxFlb7vLL5I0wNDLxJneKIsM/42XUrpOKtDXGLfY5BcGOdy9SdLUXDuKcWIFN51841thEfEuMoFr+17hoo7jIk0F/1zEg4YwvMoxdGlyDKbq/o/F7Y5U2Rhs6/JOv+N1KYAl/6Nk2oqKaR6Ak1UHhyqo7BA29Kh3SLbBJ3FHGXa4gyHkfimZdqFLLI5WsgClxdz0AExxjwzeKqxhch6RcqTPeLnZv+uDBvG/1bJKh1uBkBKJEN+G6Wtoq3Ha2ERtVYZ7C2eVQGXblLLOGVjgC+flDC9KPV460sxWFxp6sbjDg8Yb8l7JreuvJ8OriOuksSBPqUd18UCzcR3uiOIIa4nGVXNBDoJxqIlsZsnihQi5e/QepCMVawA9Q2GjNb1VEvitQph47ekt1XE1Z8ObsvToUqGc0YThAQI0/GoljTVceaTre2GHp88Nngcqz/kHB9HENikqs3Lv17YvEn6Uiyg4bfTUccCpjKj5msHVncvZfSynRlgv4g1KL8yOzAiime0r/nrkl2+90Bh2Ce+tVpnhwW/hqi+cUflJ2Gyya6nicwsjPuA== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230022)(4636009)(346002)(39860400002)(376002)(136003)(396003)(451199015)(40470700004)(46966006)(36840700001)(316002)(6916009)(36860700001)(40460700003)(36756003)(41300700001)(82740400003)(8676002)(70206006)(40480700001)(70586007)(81166007)(82310400005)(83380400001)(426003)(26005)(336012)(47076005)(186003)(2616005)(86362001)(478600001)(7696005)(44832011)(2906002)(4744005)(8936002)(5660300002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 15:33:39.5216 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 97ee9985-2dde-47f5-729e-08dab8309f41 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM7EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9793 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Szabolcs Nagy via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Szabolcs Nagy <szabolcs.nagy@arm.com> Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
patches from the morello port
|
|
Checks
Context | Check | Description |
---|---|---|
dj/TryBot-apply_patch | success | Patch applied to master at the time it was sent |
Commit Message
Szabolcs Nagy
Oct. 27, 2022, 3:33 p.m. UTC
The int mods[nmods] array on the stack was overread by one. --- elf/tst-tls20.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Comments
* Szabolcs Nagy via Libc-alpha: > The int mods[nmods] array on the stack was overread by one. > --- > 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); > } Looks good. Reviewed-by: Florian Weimer <fweimer@redhat.com> Thanks, Florian
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); }