]> git.proxmox.com Git - mirror_edk2.git/commit
NetworkPkg/HttpDxe: fix read memory access overflow in HTTPBoot.
authorSongpeng Li <songpeng.li@intel.com>
Fri, 28 Sep 2018 03:02:34 +0000 (11:02 +0800)
committerFu Siyuan <siyuan.fu@intel.com>
Sat, 29 Sep 2018 02:51:27 +0000 (10:51 +0800)
commit2239ea71b65072ce3c76d56e7074d2ee60ba1762
tree888492f0da1d86f13710aed649f8dacb16c6704d
parentb9cee524e6c1941b77b6780e19bd57052e53249c
NetworkPkg/HttpDxe: fix read memory access overflow in HTTPBoot.

The input param String of AsciiStrStr() requires a pointer to
 Null-terminated string, however in HttpTcpReceiveHeader(),
 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.

Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1204
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Songpeng Li <songpeng.li@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
NetworkPkg/HttpDxe/HttpProto.c