From nobody Mon Feb 9 22:20:14 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+109635+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+109635+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1697462303; cv=none; d=zohomail.com; s=zohoarc; b=ZgoYN3Z5evvwgShyPGiw0LPsDXvfn3RiojRgjxnqogxrAkdSPgTiW/rE+O6MIFAPdE6VoNIJy0MOGXSGJpmuw1WOASCMs6t5IOm3LQmWEI59AEtvh6mszoUlwqTiXYTTttgC9GtZRCW00/WTe09+qkCAIGf69UZF7oYzXKHrQE8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697462303; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=V9vseWoAjcd0QapMowR1RsbUhJLRyp8P0Qo5+wBqE6Q=; b=Z1xhY3cvXftNN7hx4lsa3QemzcaIGxnu9BBCTU8IOy/eWcxlWwXFZaC6fT/1w/8FLlbLSDqrNBb49bxpjyVTip/9H3zeYNXhGNC1Kry+6pDnVKqTAZCj40EElraD7ZgQ0uLeXB3xOzHwXjur/woTOe3iRr4jHrl5WUtu8wTQGRI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+109635+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1697462303695213.5331692550044; Mon, 16 Oct 2023 06:18:23 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=raq5l1Hv+Yzyz3aYYnPaoC9EnfB1uD/Z936S1pXoIA4=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1697462303; v=1; b=IqJxcXGj6xHOhKRZjEmggc/93gt+D4ImDgxUtnpQKCNFYX2lZ1CWA0uqpQluUFTOPLt2oEYX suysIGZDMcFM1urAGVIPoFbPNC5iZVulJKaWr5UL8M+xRKOe91rCjzdf12T9q7RwKHs2UrORB3D /QV8QBZPJYwXwsc6jzuKYntY= X-Received: by 127.0.0.2 with SMTP id 0OZhYY1788612xNkz6hOBzAN; Mon, 16 Oct 2023 06:18:23 -0700 X-Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) by mx.groups.io with SMTP id smtpd.web10.123807.1697462302480388128 for ; Mon, 16 Oct 2023 06:18:22 -0700 X-Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2c518a1d83fso23425441fa.3 for ; Mon, 16 Oct 2023 06:18:22 -0700 (PDT) X-Gm-Message-State: SjXwWoQ8IyQGc7sEd7bYrjFzx1787277AA= X-Google-Smtp-Source: AGHT+IGRGc+CNDfVZ6EF2FOzGlnNg+PGXM3WYEfuDJxZY3U+QxA3sCahzu4zG94ntsuG2wW5bHT5Fg== X-Received: by 2002:a2e:8e98:0:b0:2bf:f32a:1f68 with SMTP id z24-20020a2e8e98000000b002bff32a1f68mr30339110ljk.19.1697462300429; Mon, 16 Oct 2023 06:18:20 -0700 (PDT) X-Received: from PC10319.67 ([82.97.198.254]) by smtp.googlemail.com with ESMTPSA id 9-20020a2e1449000000b002ba586d27a2sm1362545lju.26.2023.10.16.06.18.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 06:18:20 -0700 (PDT) From: "Konstantin Aladyshev" To: devel@edk2.groups.io Cc: abner.chang@amd.com, isaac.w.oram@intel.com, AbdulLateef.Attar@amd.com, nicklew@nvidia.com, Konstantin Aladyshev Subject: [edk2-devel] [PATCH edk2-platforms 02/10] ManageabilityPkg: Check MCTP EIDs for reserved values Date: Mon, 16 Oct 2023 16:18:08 +0300 Message-Id: <20231016131816.6634-3-aladyshev22@gmail.com> In-Reply-To: <20231016131816.6634-1-aladyshev22@gmail.com> References: <20231016131816.6634-1-aladyshev22@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,aladyshev22@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1697462305511100009 Content-Type: text/plain; charset="utf-8" MTCP base specification marks EIDs 1-7 as reserved. Therefore return EFI_INVALID_PARAMETER if such EIDs were provided to the MctpSubmitMessage function. Signed-off-by: Konstantin Aladyshev Signed-off-by: Abner Chang --- .../Universal/MctpProtocol/Dxe/MctpProtocol.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Features/ManageabilityPkg/Universal/MctpProtocol/Dxe/MctpProto= col.c b/Features/ManageabilityPkg/Universal/MctpProtocol/Dxe/MctpProtocol.c index 88bfd9b7e7..d0f49a1abb 100644 --- a/Features/ManageabilityPkg/Universal/MctpProtocol/Dxe/MctpProtocol.c +++ b/Features/ManageabilityPkg/Universal/MctpProtocol/Dxe/MctpProtocol.c @@ -78,6 +78,23 @@ MctpSubmitMessage ( return EFI_INVALID_PARAMETER; } =20 + // + // Check source EID and destination EID + // + if ((MctpSourceEndpointId >=3D MCTP_RESERVED_ENDPOINT_START_ID) && + (MctpSourceEndpointId <=3D MCTP_RESERVED_ENDPOINT_END_ID) + ) { + DEBUG ((DEBUG_ERROR, "%a: The value of MCTP source EID (%x) is reserve= d.\n", __func__, MctpSourceEndpointId)); + return EFI_INVALID_PARAMETER; + } + + if ((MctpDestinationEndpointId >=3D MCTP_RESERVED_ENDPOINT_START_ID) && + (MctpDestinationEndpointId <=3D MCTP_RESERVED_ENDPOINT_END_ID) + ) { + DEBUG ((DEBUG_ERROR, "%a: The value of MCTP destination EID (%x) is re= served.\n", __func__, MctpDestinationEndpointId)); + return EFI_INVALID_PARAMETER; + } + Status =3D CommonMctpSubmitMessage ( mTransportToken, MctpType, --=20 2.34.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109635): https://edk2.groups.io/g/devel/message/109635 Mute This Topic: https://groups.io/mt/101994939/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-