From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A1B01211799F7 for ; Tue, 16 Oct 2018 19:46:13 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2018 19:46:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,389,1534834800"; d="scan'208";a="99851794" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga001.fm.intel.com with ESMTP; 16 Oct 2018 19:46:13 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 16 Oct 2018 19:46:12 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.217]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.245]) with mapi id 14.03.0319.002; Wed, 17 Oct 2018 10:46:11 +0800 From: "Zeng, Star" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" CC: "Zeng, Star" Thread-Topic: [edk2] [PATCH v2 00/12] Need to validate data from HW Thread-Index: AQHUZRMJh8Cq+XlD60azgbpYhFMgoaUivCSwgAAAZcA= Date: Wed, 17 Oct 2018 02:46:10 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103BC1F585@shsmsx102.ccr.corp.intel.com> References: <20181016054335.47460-1-ruiyu.ni@intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103BC1F55C@shsmsx102.ccr.corp.intel.com> In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103BC1F55C@shsmsx102.ccr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2 00/12] Need to validate data from HW X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2018 02:46:13 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Oh, Remember the missing update in UsbMassBoot.h about adding back '.', you= can do that when pushing patches. - Read some blocks from the device by SCSI 16 byte cmd. + Read or write some blocks from the device by SCSI 16 byte cmd Thanks, Star -----Original Message----- From: Zeng, Star=20 Sent: Wednesday, October 17, 2018 10:44 AM To: Ni, Ruiyu ; edk2-devel@lists.01.org Cc: Zeng, Star Subject: RE: [edk2] [PATCH v2 00/12] Need to validate data from HW Series Reviewed-by: Star Zeng Thanks, Star -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ruiy= u Ni Sent: Tuesday, October 16, 2018 1:43 PM To: edk2-devel@lists.01.org Subject: [edk2] [PATCH v2 00/12] Need to validate data from HW The patches contain logic to check the data from HW before using. It can avoid corrupted data from HW causes software behave abnormally. V2: adopt all comments from Star. The block size 0/64K handle is in a separ= ate patch "MdeModulePkg/UsbMass: Reject device whose block size is 0 or > 64K" Hao Wu (1): MdeModulePkg/Bus/Ufs: Ensure device not return more data than expected Ruiyu Ni (11): MdeModulePkg/UsbMass: Merge UsbBoot(Read|Write)Blocks(16) MdeModulePkg/UsbMass: Fix integer overflow when BlockSize is 1 MdeModulePkg/UsbBus: Fix out-of-bound read access to descriptors MdeModulePkg/UsbBus: Reject descriptor whose length is bad MdeModulePkg/Usb: Make sure data from HW is no more than expected SourceLevelDebugPkg/Usb3: Make sure data from HW can fit in buffer MdeModulePkg/UsbKb: Don't access key codes when length is wrong MdeModulePkg/AbsPointer: Don't access key codes when length is wrong MdeModulePkg/UsbMouse: Don't access key codes when length is wrong MdeModulePkg/UsbBus: Deny when the string descriptor length is odd MdeModulePkg/UsbMass: Reject device whose block size is 0 or > 64K MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c | 9 +- MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c | 7 +- MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 9 +- MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c | 19 +- .../Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c | 30 ++- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c | 70 +++++- MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c | 4 + .../Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c | 276 ++++++-----------= ---- .../Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h | 76 ++---- .../Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c | 8 +- .../UsbMouseAbsolutePointer.c | 8 +- MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c | 8 +- .../DebugCommunicationLibUsb3Transfer.c | 7 + 13 files changed, 237 insertions(+), 294 deletions(-) -- 2.16.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel