Message ID | 20240730153707.168357-18-nick.alcock@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <binutils-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 7AF6D3858420 for <patchwork@sourceware.org>; Tue, 30 Jul 2024 15:47:21 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 8E5F0385C6E1 for <binutils@sourceware.org>; Tue, 30 Jul 2024 15:38:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8E5F0385C6E1 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8E5F0385C6E1 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1722353895; cv=pass; b=dbiavj5Lksl40IvcI5TPHLsD44UN7OPX4caL+j62EYsLu2arfcNbQD8NtTsnrNx4plMVszb22FjZg5oOXgX5Mlj+xWGzoylUuFpAhaiJVkHdg+/2cHjkrM00bRYo30qbNRlnj7oG50HQjVeQCW2dFFbFsC27mgT1oY/0GoEh32A= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1722353895; c=relaxed/simple; bh=CLsnWHICEvsyyDdN9U1KiPovxj5WSORDzT2AvDRArWw=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=e2XSlSmyk+n49HjGSQ6KRauGKuzFYM404eSUZ2Ca3QdIcFAPJlfLSeo6F3vn3IXt0LKHpcgdmunMsBfrNZeSU9BRxfH36H8mb/nvpt9w7NJ6FnO6GfRtZECjm4n8evZf0V3pR0O6KfmKLxxXDERguWur+TqeN/A1Fa4eFu+PCtE= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46UFMU8P018582 for <binutils@sourceware.org>; Tue, 30 Jul 2024 15:38:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=G9rsnThtVRUsKcFWxbrBEgSMTiEPtV8AD4c3wuzwuts=; b= gIxV+v6TeGFwZ/EZb0QGkwZ4vqW+DjRc9iQuBVdNwOm2AyLkh+vUwkdkdO9icZ6P k8Wyp8hVG8JMQG6n9ERTOxA35ihyv4vqH1wuASnSGavs6F25RLyHXBhdTSysKYe7 jOQEoA6KAyq1JR4DJGi1YnBW2dnNummN5MK4Pa1YCxsmX/enBtkuWIsdM1GRpIqG ITzlbDYqZwm2dKN3mD0LafOpFkOPTuiasl8xJ/FILKwZfiNYzIhQnq2H3cpC6S7J 4bd2wO6qFbZ2q1PGSF5Gpi4udTxa+qyssP3OT4If0tb96+lL2TR10UN9l2YYrsUI 1T9I44bzK/quS1QP54XN+Q== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 40mqp1we3x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <binutils@sourceware.org>; Tue, 30 Jul 2024 15:38:13 +0000 (GMT) Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 46UF4vhN030903 for <binutils@sourceware.org>; Tue, 30 Jul 2024 15:38:12 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 40neht6st1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <binutils@sourceware.org>; Tue, 30 Jul 2024 15:38:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fwqO0zaQGM3cMm8v6I7nTghgMjxeC5w63OOZkrKYA1gn6M+OhscxH6Tbu0lNW8+RbrTb9VW+uhRI7gooUhSeWMgKAOApXrJITCIsaeoBgFrnL0e2z/EzLtuEa90IS6ES5qF/KJGyFB1aS+xKLe74Avlx8QouEc2qehtR9FGA0WN3JLShkVy8YXvUGRqLPqULwR/GTWU1PjC80VNPrUrYYFMQETLZ06t4pECvakAnvE8czj0sOOG/T30hYIGB9ClxhE8xyewftjmSiH/SfytVCW8ZTEsUIXrKnJ6pVxiDbA6yoKuvzI39ZBfXBB+kDpRwsTkfJlShe7Wxx5IVZwSqYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=G9rsnThtVRUsKcFWxbrBEgSMTiEPtV8AD4c3wuzwuts=; b=QUmzhRCO6jEaygdcJhVX29tfpnoHN0GcMykPmfZlcB2d7GTini4MSFgSszZPusJUASWa9WXP1e9T950qBT2Dsxcj3ULKk9DyvVwoKgcrbeqnUV87mSP5EARP1RC99VTaX1e0ts7k4zSgC4wLOZ17lz85mlKJlLrIIMzc63VFolanLniw49F0Y0JI3oTdqdCGqupwCByjkvjbs6wjBd54IehYPrqIHbQBRI8R5Ua4V4GLmp+MyA3iPGKLNnaDvU44Yhn3LKP6oGJlnm0Xu+8hFW4T3QXosROolk0s2BBxGSr7X9eOzjv6KlsBnBoOpcwYcEcoymtFNOU8FCbGoLIDJA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=G9rsnThtVRUsKcFWxbrBEgSMTiEPtV8AD4c3wuzwuts=; b=eI/cj2wxPYv9YOeFfN2uG64RiT1Ts9yolzULLGd7beA0SJFwfZ+6G5RCIQ32Eruj1oaHkkYLtT3oYNQvqPttg/J2gkwZr8TonlUIfbPMZM3z4QnwO7Hxf/TbP5JbILGWhg1MFFZt+asYy6a4Df3XMbFGPc19AWq6nTXdtGHQlSc= Received: from MW4PR10MB6608.namprd10.prod.outlook.com (2603:10b6:303:22e::8) by DM4PR10MB7476.namprd10.prod.outlook.com (2603:10b6:8:17d::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Tue, 30 Jul 2024 15:38:10 +0000 Received: from MW4PR10MB6608.namprd10.prod.outlook.com ([fe80::b53a:ccc1:c190:c5df]) by MW4PR10MB6608.namprd10.prod.outlook.com ([fe80::b53a:ccc1:c190:c5df%6]) with mapi id 15.20.7807.026; Tue, 30 Jul 2024 15:38:10 +0000 From: Nick Alcock <nick.alcock@oracle.com> To: binutils@sourceware.org Subject: [PATCH 17/19] libctf: fix ref leak of names of newly-inserted non-root-visible types Date: Tue, 30 Jul 2024 16:37:05 +0100 Message-ID: <20240730153707.168357-18-nick.alcock@oracle.com> X-Mailer: git-send-email 2.45.2.276.g4ac82df17e In-Reply-To: <20240730153707.168357-1-nick.alcock@oracle.com> References: <20240730153707.168357-1-nick.alcock@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: LO4P123CA0048.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:152::17) To MW4PR10MB6608.namprd10.prod.outlook.com (2603:10b6:303:22e::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR10MB6608:EE_|DM4PR10MB7476:EE_ X-MS-Office365-Filtering-Correlation-Id: de863924-7db4-4e9c-2de3-08dcb0ad9dc0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: lV4BLgiOlCP1Ry3PrmqLNId0+cX/VwSq8Y//gjdaAOnhjBUBLGY70Xg1whS0Rv9sh3Q1/+4x/BLVI3ShQ+fIiYvBA6KRs9bxFyDAIt2e2M4bQQEyNvrNap4BKVNiMAY/nudwuivtgGrSNtXRA+eXI4s7madWtzRVuc2NEw05kM1KkYhOkzgFkBN7ran2Oi33NtTSGf7SAEje80QupEyidoswhu+1bphTXqXH2FYd38AQvEfkj4doqQSQ4KzxImgWbJ21AI2iKqLsjqyFcCWASZxXso2/KhzHOMgCsZmYCvbvgDtRHkaEyTv5xYFVll6hLsbAULKZlCsCyohampd6Nf5vKPECWGsjMVVk3MqCvErks1py5RYWVnTJ8ZsJKeEJIew2x2UEJH1kd+RU5jEGdgBIn8sMZYznpNvAd1rV5htuH6NVMyK/5Fp5j7WshCVNW7vW09Qdlij9JS92d5zcZlXYJr74+6xCYTSVIxC8IecJtFl7kwwtkLdVA1q1tW8obWDS45Xu5Pi6TXz4oQkQQdUVvbVP+OFeLEafKetFMo6itPsrABkuepH7yPGl8N6lEURrawWubUuvfDTiBdxw0RBOcjXcH5wno2Wu2XPNMXCnM3YuYRkhjM8ieJ10uAJMUmNdKv+K0l5ipj7FQH+SpE0t3vP5qNWW2t2YrCTH/E9KcaqHkURp/00aZgs+GnxIBlx5Vphy3X8oog/nVeZL+0VbM7xJI6VifIC7MpXwBf8GL+Bh1WnZB+CKzai7Y5jgc3bY0adC5pvamzszsQEJFbs2eX532BkKZYQbJ85W4G73dN8L32Vua4R642gcIKn8UU/sipx+DGM23fMPFMV6M8LF9WwdLGKThbIySvJqXfbSviApCeXlmlLYyecHgWEG8IRP78LxLEBUpS3wAadvdEK283gQPkoNZvCgjaWDGYKl7w4wz+KEjrZbiiA7M/BqCjSw/NImemmOxJ9ur7oFopWtxknqCyHdMk5cz8Er4iKQ/hf3rivspjJh+DOJfc/rxrwfEz1fFMhtq+aWT0ZbfxlD/s8sH/l9MEpyIQczpwiimwuvzgvtJgJJxMVi+J2zK/7wfPi7Egtl35cY1LB3DJGpK8eUXd8/dWdvB+A6LuAZ3fCPhrocYKduke5lCYifcngwbRw0nl+4uSTJIK/jTvVswVMHFhlRjaEie+SvJhWGY/fGUpRzx2jxyiZppSnoypCNBQEeqTcr9MN+UJkXbgQfvNVMsfLNteLqA1S21AKamaJySv45ITnKyLyOCml0PY4osXFgjuZEeYpQXTUw5Cajz6uMVMRBTkPHzHNo+KtaB2FSkpTggM8yIZ7uCTfbduFYBNxabWVhVWhnRvD5SQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR10MB6608.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uqdTscUAchtFiVGuklLGR20cdovctySsGxa+pnWTscf7MUrKFecLQ6hcH5v5p38eh92YdXfQFlEdrtZ5qyqSIEVmxAvSepRGIITqelvKWkWrMJGtGKjy78e5A4BrCgOZxcls6IEofu4mOkdSFZKKX4YSZ+5pNY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vumElxdw= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: de863924-7db4-4e9c-2de3-08dcb0ad9dc0 X-MS-Exchange-CrossTenant-AuthSource: MW4PR10MB6608.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 15:38:10.4437 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pDJgOxNlBdChvBxyZOQjWL9Qg6Zn70NWvGmL+BcfBC8m0YwpPkgCXCcLAmwVDEQqBK12wMvTDMZhlb81EyYH6Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB7476 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-30_13,2024-07-30_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 suspectscore=0 bulkscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2407300106 X-Proofpoint-ORIG-GUID: SOxaEQju1ZWkZ21QLXEV8n6jK8I1j4hb X-Proofpoint-GUID: SOxaEQju1ZWkZ21QLXEV8n6jK8I1j4hb X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP 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: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org |
Series |
libctf: various bugfixes (including a write into freed memory), and loosen constraints on enums
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_binutils_build--master-arm | success | Build passed |
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 | success | Build passed |
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 | success | Test passed |
linaro-tcwg-bot/tcwg_binutils_check--master-arm | success | Test passed |
Commit Message
Nick Alcock
July 30, 2024, 3:37 p.m. UTC
A bug in ctf_dtd_delete led to refs in the string table to the names of non-root-visible types not being removed when the DTD was. This seems harmless, but actually it would lead to a write down a pointer into freed memory if such a type was ctf_rollback()ed over and then the dict was serialized (updating all the refs as the strtab was serialized in turn). Bug introduced in commit fe4c2d55634c700ba527ac4183e05c66e9f93c62 ("libctf: create: non-root-visible types should not appear in name tables") which is included in binutils 2.35. libctf/ * ctf-create.c (ctf_dtd_delete): Remove refs for all types with names, not just root-visible ones. --- libctf/ctf-create.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Comments
On 30 Jul 2024, Nick Alcock outgrape: > A bug in ctf_dtd_delete led to refs in the string table to the > names of non-root-visible types not being removed when the DTD > was. This seems harmless, but actually it would lead to a write > down a pointer into freed memory if such a type was ctf_rollback()ed > over and then the dict was serialized (updating all the refs as the > strtab was serialized in turn). > > Bug introduced in commit fe4c2d55634c700ba527ac4183e05c66e9f93c62 > ("libctf: create: non-root-visible types should not appear in name tables") > which is included in binutils 2.35. ... and now this commit is cherry-picked to all the release branches 2.35 -- 2.42 (yes I know this is overkill). Valgrinded a test run of the lot with a leak-inducing test added to prove it's really gone (and didn't break anything else).
diff --git a/libctf/ctf-create.c b/libctf/ctf-create.c index a7544955212..0c8959a997e 100644 --- a/libctf/ctf-create.c +++ b/libctf/ctf-create.c @@ -258,10 +258,10 @@ ctf_dtd_delete (ctf_dict_t *fp, ctf_dtdef_t *dtd) dtd->dtd_vlen_alloc = 0; if (dtd->dtd_data.ctt_name - && (name = ctf_strraw (fp, dtd->dtd_data.ctt_name)) != NULL - && LCTF_INFO_ISROOT (fp, dtd->dtd_data.ctt_info)) + && (name = ctf_strraw (fp, dtd->dtd_data.ctt_name)) != NULL) { - ctf_dynhash_remove (ctf_name_table (fp, name_kind), name); + if (LCTF_INFO_ISROOT (fp, dtd->dtd_data.ctt_info)) + ctf_dynhash_remove (ctf_name_table (fp, name_kind), name); ctf_str_remove_ref (fp, name, &dtd->dtd_data.ctt_name); }