From nobody Mon Nov 23 22:31:55 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=electrifex.com); dmarc=fail(p=quarantine dis=none) header.from=electrifex.com ARC-Seal: i=2; a=rsa-sha256; t=1794801523; cv=pass; d=zohomail.com; s=zohoarc; b=Cyr0bPFH/RVkEWJ2m7U7uIBwcGY6bCHU9wFGGEA67QNylqDIgmHgVjeWy/mD/UgMmYMAIUDeLshbTGUISUziQy7l9DHqnrV3LXvRESR/1wjPDNihYygpFi31e5Y6rRHs6YT9zw3v5YfBAaWdxCI1SuP0XHeW1qmTrVIfh80Ke5Q= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1794801523; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=e1H8qnZYHIxS30A0Z702RMZxS2ELfyffgl6T+qeBHRI=; b=XSpAX5DbQ5t8TzK1CFS7lp+2BlcAZoDkopvf2v81r0tlDSX9T0kSq74AJWWaQIXRELyrxSJf8e5gf9f6X02j3J7ak5ahw+vwFzUuvr0r7z5vzsMNDwNDiR1r4zNnu/rkFAm1INifRtB28md8uN0iGWyc6R6paoIuEpbdO1i+z04= ARC-Authentication-Results: i=2; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=electrifex.com); dmarc=fail header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1794801523147678.616535456783; Sun, 15 Nov 2026 19:58:43 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1490180.1691124 (Exim 4.92) (envelope-from ) id 1xSnr9-0004iF-6h; Mon, 16 Nov 2026 03:58:11 +0000 Received: by outflank-mailman (output) from mailman id 1490180.1691124; Mon, 16 Nov 2026 03:58:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1xSnr9-0004i8-2y; Mon, 16 Nov 2026 03:58:11 +0000 Received: by outflank-mailman (input) for mailman id 1490180; Mon, 16 Nov 2026 03:58:10 +0000 Received: from mx.expurgate.net ([194.145.224.20]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1xSnr8-0004i2-4a for xen-devel@lists.xenproject.org; Mon, 16 Nov 2026 03:58:10 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1xSnr7-009J1X-21 for xen-devel@lists.xenproject.org; Mon, 16 Nov 2026 04:58:09 +0100 Received: from [10.42.69.2] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6afa7ee0-e002-0a2a0a5209dd-0a2a4502ed00-44 for ; Mon, 16 Nov 2026 04:58:08 +0100 Received: from [3.110.59.166] (helo=repost.tmes-in.trendmicro.com) by tlsNG-720697.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6afa7f4e-6ca4-0a2a45020019-036e3ba6edc3-3 for ; Mon, 16 Nov 2026 04:58:08 +0100 Received: from 52.101.227.79_.trendmicro.com (unknown [172.26.44.244]) by repost.tmes-in.trendmicro.com (Postfix) with SMTP id 1132EC000E15; Mon, 16 Nov 2026 03:58:06 +0000 (UTC) Received: from MA0PR01CU009.outbound.protection.outlook.com (unknown [52.101.227.79]) by repre.tmes-in.trendmicro.com (Trend Micro Email Security) with ESMTPS id 96393C00042B; Mon, 16 Nov 2026 03:58:03 +0000 (UTC) Received: from PNYPR01MB11444.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:2e4::9) by PNVPR01MB13824.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:347::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.615.14; Mon, 16 Nov 2026 03:58:00 +0000 Received: from PNYPR01MB11444.INDPRD01.PROD.OUTLOOK.COM ([fe80::b5ca:719e:bc57:e90f]) by PNYPR01MB11444.INDPRD01.PROD.OUTLOOK.COM ([fe80::b5ca:719e:bc57:e90f%7]) with mapi id 15.21.0615.013; Mon, 16 Nov 2026 03:58:00 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; none X-TM-MAIL-RECEIVED-TIME: 1794801483.614000 X-TM-MAIL-UUID: deea930c-702e-4f50-a498-09ff01df3394 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=grtECFzZE9ZhZxMuHaflWsJvoSjjpbZ7BrBiknbs0kFq/bNPAET0SRPktEXayKVAFBbCMMWffMCKAq969EIdjSM71Wqw6ln77mcju6+1hIwMOpzyavu1Fm7dhFVh74vpd2AlJAGRvWB4f11m+Ub5HufSlbYy6kmFRUEeTpAJAECgnwLHWXpepX2SxRB2l3L3Od4WuKtp+pYI91AqGIWfEDjcdszNzgy/baPlwWbH2cEpxwD35qEvvUo1dUltCKxBDt+X1ub1Gg2Ga8AtnKfpSHnUbWkdOm+GumqJEY+qKCIHo16qj55YU8YxMPcLiC0GCKrIMShutX9Ynos7RITQgA== 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=e1H8qnZYHIxS30A0Z702RMZxS2ELfyffgl6T+qeBHRI=; b=Nk7I1HBtFG9otG/OoWm/G2IO3Dw0xJgoYD/QprHRgqtAVThC/wilE+IgUvxMlGCdDlDtiMKtZEypDJcbyuSWTlz7v1pdLUQT7AcM+6DP/aIRsOByQs3Xumxu+JqE9MWnaVO6ouFxeJrJmEN8yZfw4zOj9pgF8KQyLsuAs4G7U7hOMvH6sSk8yg3a4dlKka0ZXRoxQpLHWHyObtCbY5EJzfCioDO0J4MTrVw3bXXstnf1rhELvPoD81swBKiItr2gimlD1VefwKtMjN8wXnfx0dX3TO+3J6O8XpUEdtXANppFtOfcZH07S60L7qYMHLZ/GIFnhT280f+TIX7mPxb0ng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=electrifex.com; dmarc=pass action=none header.from=electrifex.com; dkim=pass header.d=electrifex.com; arc=none From: Anandu Padinhare To: "jbeulich@suse.com" , "marmarek@invisiblethingslab.com" , "dpsmith@apertussolutions.com" CC: "xen-devel@lists.xenproject.org" Subject: [PATCH] EFI: avoid use-after-free when chaining config files Thread-Topic: [PATCH] EFI: avoid use-after-free when chaining config files Thread-Index: AQHddX1tQ+fu8I3FBUK/zOgMqZ8Scg== Date: Mon, 16 Nov 2026 03:58:00 +0000 Message-ID: Accept-Language: en-IN, en-US Content-Language: en-IN X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=electrifex.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PNYPR01MB11444:EE_|PNVPR01MB13824:EE_ x-ms-office365-filtering-correlation-id: 199aa0f8-4d77-441b-5c5f-08df4395ced2 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|23010399003|366016|1800799024|376014|38070700021|10067099003|56012099006|261026135527099003|261026121527099003|261026140227099003|261026130827099003|261028144727099003|261021135927099003|261021133027099003|261021130227099003|261022115727099003|261022113327099003|261022105027099003|261022075727099003|261021123027099003|261021121427099003|261102123227099003|261009223027099003|18002099003|17002099007|6133799003; x-microsoft-antispam-message-info: L/8OSdMArSs+PXO8D/Ha2yVEO+ikotm3soAtE8+qt3mt1twTXh95McksX0cIXukuGe4m077AUCOFRRBer0KEhC6CZ029OvqkzmdXn8v+u2dWIdzqwU9t804HvODV9VXGIYLfG3oOcOqJXL9LkgOEnnNDsjTVogtti3VrRhxWfg1wL5CooX0Pr+RWTdnm0N/Qa8utvevlE6zb2HKNqWuM6+wIJILgu7BIY0ISsRw2R3Krd/gddihc/u3M+LOtAIlfNaF24960FJINWmTjIAjmwGNfomPaig8fIAQ7bl83FDUGftQZd+X+2PuWANlc41hmoAwvp3BQBr2aNlq0X6M8v7gKa/MnA7jz9i7KblBg1fH9OL3ZGUP3mif0EFbBC4CjKboZNcT/V2y7DpCM45Rjx9Hy+q2e+y2uVAiMn+UgsUEgECf6vVT1Y8eHK3yAEh7Rhb8r0a4Ugxfi7eN1ZQk4ocucAUT3RvkasQh0meXlg92u2mCqaPqys4k5xZbHkW5Dq90gPgTUQEGkFlaGIrCklID9aZsGE0XzdLzmC/zRatD4iiwAWWikIwEwhDJ99g9p1zEBEmDlCkRRH2xDagSR5WmIiniU6wWF/C81LxuB8pvoDem2hOgSE4KHtxCpC/uvdNolKuU/lr9MEhcJQeLZHytYnyHwqo6gGb1jk1qJiuP4HvXViDgIf7XXzivNbSx6YytCVmQ6rcXFvVu7PzB1MQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PNYPR01MB11444.INDPRD01.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(23010399003)(366016)(1800799024)(376014)(38070700021)(10067099003)(56012099006)(261026135527099003)(261026121527099003)(261026140227099003)(261026130827099003)(261028144727099003)(261021135927099003)(261021133027099003)(261021130227099003)(261022115727099003)(261022113327099003)(261022105027099003)(261022075727099003)(261021123027099003)(261021121427099003)(261102123227099003)(261009223027099003)(18002099003)(17002099007)(6133799003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?V/CIWEpPA9pH/GjyWd0adUiue1sPHoVROSrt8QrQ3b/2Hdj8Bhs/9XOXdX?= =?iso-8859-1?Q?R9LXa7R6cZNAsYDiqYIgBpqFVq8yN4NpreOxCFlJOIm9krwByIrL0os20C?= =?iso-8859-1?Q?DA4+RqeSNSpCHJ7Qzvg7A5gT32AuY2E0azdRf3bkeT6lC0osxh+Wf1eD+R?= =?iso-8859-1?Q?4OarAUKbjDeU6vutky7DAQCOduKMtnvvIryCRTAtV2Bg2pnFVRr04ErT7o?= =?iso-8859-1?Q?00/no0WleBSjHGVh3s3Lu+jKolpVh9ROfAa4Plo5gEPAjPAr0KRpcbR1fM?= =?iso-8859-1?Q?89oMqw/wouX28gH0uvEPGJ/tElhNAwFwKtWgzVaty+6Sl/IgJiUS4DfQwU?= =?iso-8859-1?Q?k32QIgrXO8/TYyCmtByl0E3nMw66r+oWH8x3e24Ni3k7Ws+B5GRjFFdCz0?= =?iso-8859-1?Q?52LRt60mekhi1B0jG9Z1fOdCAp5CxM6VIo7kDEHhH6qzsSQQKfR6JKm+Gd?= =?iso-8859-1?Q?VRDibRNPawarZlWWWvBOjndoRBytq1yC2CzzYLl3zMHwksMojb/Bfca0dO?= =?iso-8859-1?Q?xuR5D7GHpv9VFxS+OVOyxgp2jaNUAaFfoWwtDVAjQggHneOcVInzGoQrH9?= =?iso-8859-1?Q?SRQOMYE0FlCP1TCp4u3hnfHTZJa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= =?iso-8859-1?Q?Uo+yHXunKNSIfZnIlmEgmlHjCnv+rNdN8G8GhC1n1LTmAFOgfEA4Z87fXp?= =?iso-8859-1?Q?2k+xgqb5pwhsoplzrMKwwFnooDvKKuYTlyMbMsbGUEm93To6FSPBHqQG0y?= =?iso-8859-1?Q?uNPPDB84WyxNDZ9Xzad0qvwzW24+POt23ywfkGrJZvrXT0Ngfemeu/GoZc?= =?iso-8859-1?Q?i6Zof6k/P3hLwZE74SN/swwpwosUq7V0GvHt1xwuItsxjwJCGLdW+fFQLZ?= =?iso-8859-1?Q?4KsdhXGG25TUJLRfsRK9DbO3ZG7mQCBg2cHvd/BnEzB3GYe8CjLXmlJgD5?= =?iso-8859-1?Q?NNbwK8IncQ=3D=3D?= Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Exchange-RoutingPolicyChecked: GvnKLZvZhmbrg6mZUx4RZUwvdvjom/wKglyY4P2ZHeq5ayBXmQSgbzg/6JWrQUl3hcVyFHESrTCjuY/S8mtpo8k9RfTXc41Ftbnb04YJxDARy09UeVQ0rv/4/V1BZHPnz7KjAwat3iuwnslMtqiRJjAZPOMk0Y/jsVwP6Nym0hpcS9abam9kER58zPkWS3ty24bZVtUBgFXyC09epjrSacDQkQNBUjhtzBpC3RmV+bpaCv5142rQIBtCWZdxQFiY3ErRLLRDWTiIVUAKtbi5KAG81Z316eQOMNVkOdu2w3OYjk8q2wwcSuqBOVYbBn50T5bNOdgDM6BsWn2HdEI/FA== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: Qz7c8AcBw34e0nTNmZaD6CKBw6F3DllZr1OjMCa2Rw7U1Ub8GKyW1hd1SpEUsRuM3wDNGwtBX8Q2KGVsRbRJJyZ0ES41Ts9BUZD1EbrzyrnX/F3bFeVXYMP6vGecctKC0g1VM8tIAW94uhXMC+c93MsCaqPZGABeJIhFP3fkPAZcWHse3xC7DheV/DOKLY7xM5ckQLLC7B8t9nUvW/c/MhSJLRno66wfud6ISPgiFgdMRLdEaS6njIHkW1QJHQjFlHFZOy4mQxQ/FWlViZUT17utB8aPNtfOwsAVeRpLqqqDC5dP+0EQE9EK6nGvE0C6L+oxvAfUcLfKqnOy+b8ko4GZHr5/VYry5pkFVyLBwEu9RYqh/M7F48XJSTUk9sC5sUSZHLlFXCxHKPrJucpzcH1Yg6XHjQoNGT4+0or/hIAQOqYYUXsyg1Y0DRVfKj0BGgMb2QtCKPQrKyatYvUBV+eYjQ+IYRlBYVF/2W4jW08S49QKUsnSu4plYbpwdEvT0QlpNof9nadFtps/oS6MvgbYa9WotAB7HdY1m7EYVz6v7/rdg4zFVu0lbHT/ZZ1+5+0JdXTZIlTwgdQN4qMQzr5nr5+I3Vty0jb9VZyKO2M= X-OriginatorOrg: electrifex.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PNYPR01MB11444.INDPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 199aa0f8-4d77-441b-5c5f-08df4395ced2 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Nov 2026 03:58:00.8463 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f2626450-e675-4872-bae6-db17376f7643 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: HRWgNWdxeC6OIPzeGyR/KOnEFhP/UzfaVvOoTlahezQsw3QEoHKVRKwyq6r0GVoIij8YRaR99xc4qo+1ITTohgYaoBEqBRlsFlgd4d/sxqA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PNVPR01MB13824 X-TM-AS-ERS: 52.101.227.79-0.0.0.0 X-TMASE-Version: StarCloud-1.3-9.2.1014-30322.004 X-TMASE-Result: 10--16.934600-7.000000 X-TMASE-MatchedRID: OGyXdhuZG8ld9p1fQ1RL+NwK3aKXLlLAF1k2re42Ig0oEQF9D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6DLHS6JmBL3rz/tmchZ43W2OpJoXVMfkAfcZCvUzP808rFVaQCFg/DX0H75J4u 3YgRP7LPB+by9q/kEG7cM9mN+ilYPMLQ9VXSdmACNwId5f7rKZJDfaa7MzlBuJPYc0K/LwYtWr+ 9MBiOntKGfirLF6YEz3eZWdunSwA== X-TM-Addin-ProductCode: EMS X-TM-Deliver-Signature: C2D816BF1C2C365364BC36269301209F X-purgate-ID: tlsNG-720697/1794801488-672B12AC-CF8EE228/0/0 X-purgate-type: clean X-purgate-size: 4075 X-ZM-MESSAGEID: 1794801524098158500 Content-Type: text/plain; charset="utf-8" When following "chain=3D", efi_start() frees the buffer holding the current config file (if it was allocated) and only afterwards converts the chained file's name, which points into that buffer, with s2w(). The section name, when taken from "default=3D", also points there and is used for the subsequent lookups in the chained file. read_file() may well get back the very pages just freed (as observed with OVMF), so the section name may end up referring to arbitrary text of the chained file, selecting the wrong section (or none). With firmware overwriting freed memory (e.g. Ubuntu's OVMF 2025.11, which fills it with 0xAF), even the file name is garbage, and loading the chained file fails with "Open failed for ...: Invalid parameter". Convert the file name before freeing the buffer, and copy the section name. A configuration relying on the stale pointer happening to refer to the chained file's own "default=3D" value will now use the section named in the original file instead. Fixes: 81da4016bfeb ("x86-64/EFI: allow chaining of config files") Assisted-by: Claude Signed-off-by: Anandu Padinhare --- Tested in QEMU, booting xen.efi directly: on x86 (i440fx, Ubuntu OVMF 2025.11) with a Linux PV Dom0, on Arm64 (virt, AAVMF 2025.11, cross-built) up to Dom0 construction with a dummy kernel. Before the patch, every test chaining from a config file read from disk failed ("Open failed for ..." on x86, "Chained configuration file '...'not found." with a truncated name on Arm64). With it, "kernel=3D", "options=3D" and "ramdisk=3D" (x86) or "dtb=3D" (Arm64) come from the chained file, also across several levels; with the section given on the xen.efi command line (x86, started from the UEFI shell) the right section was used too. Booting without "chain=3D" is unaffected. A build fixing only the file name showed the chained file loaded into the same pages as the freed one, with the section name then taken from its text. For simplicity the section name is also copied when it came from the command line (and hence isn't in the buffer). The copies aren't freed: they are EfiLoaderData, which Xen uses as ordinary RAM after ExitBootServices() anyway. Not tested on real hardware. xen/common/efi/boot.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c index 89b5831691..fccde265a4 100644 --- a/xen/common/efi/boot.c +++ b/xen/common/efi/boot.c @@ -1584,9 +1584,24 @@ void EFIAPI __init noreturn efi_start(EFI_HANDLE Ima= geHandle, name.s =3D get_value(&cfg, "global", "chain"); if ( !name.s ) break; + /* + * name.s, and section.s if it came from "default=3D", point i= nto + * the buffer freed below. Copy both before freeing it. + */ + name.w =3D s2w(&name); + if ( section.s ) + { + size_t len =3D strlen(section.s) + 1; + void *ptr; + + if ( efi_bs->AllocatePool(EfiLoaderData, len, + &ptr) !=3D EFI_SUCCESS ) + blexit(L"Unable to allocate string buffer"); + section.s =3D memcpy(ptr, section.s, len); + } free_cfg(); ensure_dir_handle(loaded_image, &dir_handle, &file_name); - if ( !read_file(dir_handle, s2w(&name), &cfg, NULL) ) + if ( !read_file(dir_handle, name.w, &cfg, NULL) ) { PrintStr(L"Chained configuration file '"); PrintStr(name.w); base-commit: 97bf370375113caf92fccf04e2877fc6b5ff887f