]> git.proxmox.com Git - mirror_edk2.git/commit
NetworkPkg/Ip6Dxe: Validate source data record length
authorMichael Kubacki <michael.kubacki@microsoft.com>
Wed, 8 Apr 2020 05:46:37 +0000 (22:46 -0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 17 Apr 2020 17:34:33 +0000 (17:34 +0000)
commit1c761011340d830a2bf66128325a686ffff3f5e9
treebadd7255a0383c5cfe6a1c6b239b494ff2612d48
parentdf4f154da9cb193b8e539157d1ed1a851cf1488e
NetworkPkg/Ip6Dxe: Validate source data record length

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2273

Ip6ConfigReadConfigData() reads configuration data from a UEFI variable
and copies the data to another buffer. This change checks that the
length
of the data record being copied does not exceed the size of the source
UEFI variable data buffer.

If the size is exceeded, this change follows existing logic to treat the
variable as corrupted and deletes the variable so it will be set again.

Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c