From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=songpeng.li@intel.com; receiver=edk2-devel@lists.01.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 C4FDF21140F47 for ; Tue, 25 Sep 2018 01:25:02 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2018 01:25:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,301,1534834800"; d="scan'208";a="266460054" Received: from songpeng.ccr.corp.intel.com ([10.239.158.28]) by fmsmga006.fm.intel.com with ESMTP; 25 Sep 2018 01:25:01 -0700 From: Songpeng Li To: edk2-devel@lists.01.org Date: Tue, 25 Sep 2018 16:24:38 +0800 Message-Id: <20180925082440.20416-1-songpeng.li@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 Subject: [PATCH 0/2] fix read memory access overflow in HTTPBoot. 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: Tue, 25 Sep 2018 08:25:03 -0000 The input param String of AsciiStrStr() requires a pointer to Null-terminated string, however in HttpTcpReceiveHeader() and HttpUtilitiesParse(), the Buffersize before AllocateZeroPool() is equal to the size of TCP header, after the CopyMem(), it might not end with Null-terminator. It might cause memory access overflow. Songpeng Li (2): NetworkPkg/HttpDxe: fix read memory access overflow in HTTPBoot. NetworkPkg/HttpUtilitiesDxe: fix read memory access overflow. NetworkPkg/HttpDxe/HttpProto.c | 10 ++++++---- NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c | 8 +++++++- 2 files changed, 13 insertions(+), 5 deletions(-) -- 2.18.0.windows.1