Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8EBE7F41996 for ; Wed, 15 Apr 2026 11:58:43 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1282361.1564966 (Exim 4.92) (envelope-from ) id 1wCyt6-0000nD-Ts; Wed, 15 Apr 2026 11:58:32 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1282361.1564966; Wed, 15 Apr 2026 11:58:32 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wCyt6-0000n6-RJ; Wed, 15 Apr 2026 11:58:32 +0000 Received: by outflank-mailman (input) for mailman id 1282361; Wed, 15 Apr 2026 11:58:31 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wCyt5-0000n0-M1 for xen-devel@lists.xenproject.org; Wed, 15 Apr 2026 11:58:31 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wCyt3-00APm8-G7 for xen-devel@lists.xenproject.org; Wed, 15 Apr 2026 13:58:31 +0200 Received: from [10.42.69.10] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69df7d5a-e002-0a2a0a5209dd-0a2a450ab282-24 for ; Wed, 15 Apr 2026 13:58:30 +0200 Received: from [198.2.187.14] (helo=mail187-14.suw11.mandrillapp.com) by tlsNG-4011c0.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.0) (envelope-from ) id 69df7d65-ee98-0a2a450a0019-c602bb0eb902-3 for ; Wed, 15 Apr 2026 13:58:30 +0200 Received: from pmta09.mandrill.prod.suw01.rsglab.com (localhost [127.0.0.1]) by mail187-14.suw11.mandrillapp.com (Mailchimp) with ESMTP id 4fwfkG6SFPz8XSLZn for ; Wed, 15 Apr 2026 11:56:22 +0000 (GMT) Received: from [37.26.189.201] by mandrillapp.com id 9c3c2a7e817948e4aa5e830b2a7d3782; Wed, 15 Apr 2026 11:56:22 +0000 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; dkim=pass header.s=mte1 header.d=mandrillapp.com header.i="@mandrillapp.com" header.h="From:Subject:Message-Id:To:Cc:References:In-Reply-To:Feedback-ID:Date:MIME-Version:Content-Type:Content-Transfer-Encoding"; dkim=pass header.s=mte1 header.d=vates.tech header.i="teddy.astie@vates.tech" header.h="From:Subject:Message-Id:To:Cc:References:In-Reply-To:Feedback-ID:Date:MIME-Version:Content-Type:Content-Transfer-Encoding" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; s=mte1; t=1776254182; x=1776524182; bh=WIWJlCYAKOt0EHTWZdN0VepA2MSlrAv0igbJ3uBehFg=; h=From:Subject:Message-Id:To:Cc:References:In-Reply-To:Feedback-ID: Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date: Subject:From; b=FQRaEMZspkHw0E7oZGKsLJ+X6cyXylXGT60UsrNzgQ06REGJXpWYIJInvadwoJ/UC h3AfB4Omyb/RLVFOuV84MiQIO5bmNjIsuE8kQ/E1kNvw1m3bNCdXgQWqJ1V7kenffr b/I08Cz1VOhLFVQQgoWYBWNxfrN80J7nde1xnqoYyi1zmAOBQYtoKKn4BRL9YW2k0E CH/Mipav0KPQFFVUmprEi1DFnoGlp/PTxpPHcnNfVr74xJwRgE+3AZsIjW6d4RbK83 sm0cajmE+0fVYA1PfiEAm95tkk9BbvDHeU6njmXYRdgye70gx0YhCQ5DzAvDfoP/Hx LwSNbijU1roig== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; s=mte1; t=1776254182; x=1776514682; i=teddy.astie@vates.tech; bh=WIWJlCYAKOt0EHTWZdN0VepA2MSlrAv0igbJ3uBehFg=; h=From:Subject:Message-Id:To:Cc:References:In-Reply-To:Feedback-ID: Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date: Subject:From; b=nfuSHcvY9Vpz4mWWc1r0kBUVcj772WAxm6nlGXzTIr7OlX64m0/76nn4JDzs26LvT WGQgVt5Jt5vWuetfAQlEoQDOcDFYF4PW1tSd/g7k/wobvkltMWYvDunBYpcBwFR9Ps dJ5hUIxof/4AL1hfLFe8Z1aCdcSz/kGmcVhGGL/i9rydsCdTC0ZGPx+ib9bhC/axAT eSYuo9LTRnIcS0m/TpTnih2QLUbMIIGSPro6w2j+IPoGGi7AHDZTkf25/yfXM3Ehv1 4DtwumLfdVBTVQg6YqmRPWqKkVuy5aOvkyOhUILxUciZPDwhw4tOMp63mEH3aAkLX/ tYTg8AlzKv1yA== From: "Teddy Astie" Subject: =?utf-8?Q?Re:=20[PATCH=201/6]=20xen/dt-overlay:=20fix=20double-free=20of=20rangesets=20on=20attach=20failure?= X-Bm-Disclaimer: Yes X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2 X-Bm-Transport-Timestamp: 1776254181615 Message-Id: <29f94a8b-1c5d-42b6-9887-4303ddf58bd0@vates.tech> To: "Gyujeong Jin" , "Michal Orzel" Cc: xen-devel@lists.xenproject.org, "Stefano Stabellini" , "Julien Grall" , "Bertrand Marquis" References: <20260415113700.107915-1-michal.orzel@amd.com> <20260415113700.107915-2-michal.orzel@amd.com> In-Reply-To: X-Native-Encoded: 1 X-Report-Abuse: =?UTF-8?Q?Please=20forward=20a=20copy=20of=20this=20message,=20including=20all=20headers,=20to=20abuse@mandrill.com.=20You=20can=20also=20report=20abuse=20here:=20https://mandrillapp.com/contact/abuse=3Fid=3D30504962.9c3c2a7e817948e4aa5e830b2a7d3782?= X-Mandrill-User: md_30504962 Feedback-ID: 30504962:30504962.20260415:md Date: Wed, 15 Apr 2026 11:56:22 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-purgate-ID: tlsNG-4011c0/1776254310-BED4A0B1-88B86905/0/0 X-purgate-type: clean X-purgate-size: 2554 Le 15/04/2026 =C3=A0 13:51, Gyujeong Jin a =C3=A9crit=C2=A0: > Thanks for your efforts. > > I=E2=80=99ve seen some advisories that received cve here. > https://xenbits.xen.org/xsa/ > > Can I receive a cve for this report? > > Thanks. > Device-tree overlay is marked as "Experimental", hence it's not Security supported so no XSA would be issued, even if it it has security implications for the feature. I don't know regarding individual CVEs though. > 2026=EB=85=84 4=EC=9B=94 15=EC=9D=BC (=EC=88=98) 20:37, Michal Orzel >=EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > handle_attach_overlay_nodes() destroys the IRQ and IOMEM rangesets on > failure but leaves the pointers dangling in the tracker entry. A > subsequent handle_remove_overlay_nodes() for the same overlay will ca= ll > rangeset_consume_ranges() on freed memory followed by a second > rangeset_destroy(), resulting in use-after-free and double-free. > > NULL the pointers after rangeset_destroy() so that remove_nodes() and > handle_remove_overlay_nodes() skip the stale entries. > > Fixes: 4c733873b5c2 ("xen/arm: Add XEN_DOMCTL_dt_overlay and device > attachment to domains") > Reported-by: Gyujeong Jin > > Signed-off-by: Michal Orzel > > --- > =C2=A0xen/common/device-tree/dt-overlay.c | 2 ++ > =C2=A01 file changed, 2 insertions(+) > > diff --git a/xen/common/device-tree/dt-overlay.c b/xen/common/ > device-tree/dt-overlay.c > index d184186c015e..6fa07dbf42a5 100644 > --- a/xen/common/device-tree/dt-overlay.c > +++ b/xen/common/device-tree/dt-overlay.c > @@ -910,7 +910,9 @@ static long handle_attach_overlay_nodes(struct > domain *d, > =C2=A0 =C2=A0 =C2=A0if ( entry ) > =C2=A0 =C2=A0 =C2=A0{ > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rangeset_destroy(entry->irq_ranges= ); > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 entry->irq_ranges =3D NULL; > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rangeset_destroy(entry->iomem_rang= es); > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 entry->iomem_ranges =3D NULL; > =C2=A0 =C2=A0 =C2=A0} > > =C2=A0 =C2=A0 =C2=A0return rc; > -- > 2.43.0 > Teddy -- Teddy Astie | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech