From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::42a; helo=mail-wr1-x42a.google.com; envelope-from=roman.bacik@broadcom.com; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CA9F12097E26E for ; Mon, 16 Jul 2018 21:31:33 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id a3-v6so24692148wrt.2 for ; Mon, 16 Jul 2018 21:31:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=GWQRy5e6zd6fgKYQA/hwsjs8J70bNV2xZjdYTgIQzXQ=; b=IorTVJORet04NIr/wXEY2OwEOKrPPr1Zhon+VDneQhNCcZQ1afkMpdRiff61pRjkTp s+RDstxaN2YvIQESijocBjSEXN9qxjDIlu0uNHtIiCFfTKmkwsNRh5pMGC0dBGjibUZZ XosHGJs2I7qf7fQOnnWxM1DN1oAsTJRlVuuE8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=GWQRy5e6zd6fgKYQA/hwsjs8J70bNV2xZjdYTgIQzXQ=; b=TxvEZ2eumuiUl69vW6cgSsG7OGzTZFTmuJ0T7p1n3Twav1dEt+BR3eI9VfV2e9nis0 B8lJKxa7jFbYaZZkYogJ9pGh6LBkWF5MwfYY/KFuDhCTwSPFDMtfN+pDjkGGTTyKJKwP 2aALSEAypL/wHmxKlo/9fMVbMOmQYODBUIWxeatq+lKerH2OWGinl997B77DtNPdesp0 4JzSPJzR6jeFxG1r5XR4QhY2ehNLlGIY7JGNbmI4H4Ei3Z3H/BYezMmobZwygy8tgTYV cBcRKhZ5284bWOEEmoVJuZWCB8LXWJH3dL4jfO1XJ1+YjS/VhQkNh07HjMNmuScpz3iN DFHw== X-Gm-Message-State: AOUpUlGh/96f3UjPm2/h6wdYFWIw4CSZohKZsOHkhJ/z6gnLhkq3u440 mVjEZwN0Kx0KTtrJIuT5ifWHPzbkG+r233hAJW+xig== X-Google-Smtp-Source: AAOMgpeWjPVSD2h36oMevtza5s/X1eIByJ+oiHkhwrIDwKZcdrAA7jrRzA3Rfsy0ngugaJedIACZu9SaOIh5xH1HPAs= X-Received: by 2002:adf:e3c5:: with SMTP id k5-v6mr26750wrm.94.1531801891500; Mon, 16 Jul 2018 21:31:31 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:f505:0:0:0:0:0 with HTTP; Mon, 16 Jul 2018 21:30:51 -0700 (PDT) In-Reply-To: <74D8A39837DF1E4DA445A8C0B3885C503ACAC712@shsmsx102.ccr.corp.intel.com> References: <20180710225105.28443-1-roman.bacik@broadcom.com> <74D8A39837DF1E4DA445A8C0B3885C503ACAC712@shsmsx102.ccr.corp.intel.com> From: Roman Bacik Date: Mon, 16 Jul 2018 21:30:51 -0700 Message-ID: To: "Yao, Jiewen" Cc: "Zhang, Chao B" , "rbacik@gmail.com" , "edk2-devel@lists.01.org" , Laszlo Ersek , Vladimir Olovyannikov X-Content-Filtered-By: Mailman/MimeDel 2.1.27 Subject: Re: [PATCH v2] SecurityPkg: Fix assert when setting key from eMMC/SD/USB X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 04:31:34 -0000 Content-Type: text/plain; charset="UTF-8" Yes, it is being taking care of. On Mon, Jul 16, 2018 at 8:50 AM, Yao, Jiewen wrote: > Laszlo already filed one - https://bugzilla.tianocore. > org/show_bug.cgi?id=1008 > > I suggest we add to UefiLib instead of fixing all individual driver. > > Thank you > Yao Jiewen > > > > -----Original Message----- > > From: Zhang, Chao B > > Sent: Monday, July 16, 2018 11:10 PM > > To: rbacik@gmail.com; edk2-devel@lists.01.org > > Cc: Yao, Jiewen ; Laszlo Ersek >; > > Vladimir Olovyannikov > > Subject: RE: [PATCH v2] SecurityPkg: Fix assert when setting key from > > eMMC/SD/USB > > > > Hi Bacik: > > Tks for the fix. Would you please file another report in Bugzilla for > RamDisk > > & Tls Configuration driver? They have same issue as SecureBootConfig > driver > > > > -----Original Message----- > > From: rbacik@gmail.com [mailto:rbacik@gmail.com] > > Sent: Wednesday, July 11, 2018 6:51 AM > > To: edk2-devel@lists.01.org > > Cc: Zhang, Chao B ; Yao, Jiewen > > ; Laszlo Ersek ; Vladimir > > Olovyannikov > > Subject: [PATCH v2] SecurityPkg: Fix assert when setting key from > > eMMC/SD/USB > > > > From: Roman Bacik > > > > When secure boot is enabled, if one loads keys from a FAT formatted > > eMMC/SD/USB when trying to provision PK/KEK/DB keys via the menu, an > > assert in StrLen() occurs. > > This is because the filename starts on odd address, which is not a uint16 > > aligned boundary: https://bugzilla.tianocore.org/show_bug.cgi?id=1003 > > > > Cc: Chao Zhang > > Cc: Jiewen Yao > > Cc: Laszlo Ersek > > Cc: Vladimir Olovyannikov > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Roman Bacik > > --- > > > > SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/ > SecureBootConfigFil > > eExplorer.c | 13 +++++++++++-- > > 1 file changed, 11 insertions(+), 2 deletions(-) > > > > diff --git > > a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfig > > FileExplorer.c > > b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfig > > FileExplorer.c > > index 1b6f88804275..19b13a5569a6 100644 > > --- > > a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfig > > FileExplorer.c > > +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootCo > > +++ nfigFileExplorer.c > > @@ -123,6 +123,8 @@ OpenFileByDevicePath( > > EFI_FILE_PROTOCOL *Handle1; > > EFI_FILE_PROTOCOL *Handle2; > > EFI_HANDLE DeviceHandle; > > + CHAR16 *PathName; > > + UINTN PathLength; > > > > if ((FilePath == NULL || FileHandle == NULL)) { > > return EFI_INVALID_PARAMETER; > > @@ -173,6 +175,11 @@ OpenFileByDevicePath( > > // > > Handle2 = Handle1; > > Handle1 = NULL; > > + PathLength = DevicePathNodeLength(*FilePath) - > > sizeof(EFI_DEVICE_PATH_PROTOCOL); > > + PathName = AllocateCopyPool(PathLength, > > ((FILEPATH_DEVICE_PATH*)*FilePath)->PathName); > > + if (PathName == NULL) { > > + return EFI_OUT_OF_RESOURCES; > > + } > > > > // > > // Try to test opening an existing file @@ -180,7 +187,7 @@ > > OpenFileByDevicePath( > > Status = Handle2->Open ( > > Handle2, > > &Handle1, > > - > > ((FILEPATH_DEVICE_PATH*)*FilePath)->PathName, > > + PathName, > > OpenMode &~EFI_FILE_MODE_CREATE, > > 0 > > ); > > @@ -192,7 +199,7 @@ OpenFileByDevicePath( > > Status = Handle2->Open ( > > Handle2, > > &Handle1, > > - > > ((FILEPATH_DEVICE_PATH*)*FilePath)->PathName, > > + PathName, > > OpenMode, > > Attributes > > ); > > @@ -202,6 +209,8 @@ OpenFileByDevicePath( > > // > > Handle2->Close (Handle2); > > > > + FreePool (PathName); > > + > > if (EFI_ERROR(Status)) { > > return (Status); > > } > > -- > > 2.17.1 > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel >