NetworkPkg: Ip6Dxe: SECURITY PATCH CVE-2023-45231 Unit Tests

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

Validates that the patch for...

Out-of-bounds read when handling a ND Redirect message with truncated
options

.. has been fixed

Tests the following function to ensure that an out of bounds read does
not occur
Ip6OptionValidation

Cc: Saloni Kasbekar <saloni.kasbekar@intel.com>
Cc: Zachary Clark-williams <zachary.clark-williams@intel.com>

Signed-off-by: Doug Flick [MSFT] <doug.edk2@gmail.com>
Reviewed-by: Saloni Kasbekar <saloni.kasbekar@intel.com>
This commit is contained in:
Doug Flick
2024-01-26 05:54:49 +08:00
committed by mergify[bot]
parent bbfee34f41
commit 6f77463d72
4 changed files with 192 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
## @file
# Unit test suite for the Ip6Dxe using Google Test
#
# Copyright (c) Microsoft Corporation.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
[Defines]
INF_VERSION = 0x00010017
BASE_NAME = Ip6DxeUnitTest
FILE_GUID = 4F05D17D-D3E7-4AAE-820C-576D46D2D34A
VERSION_STRING = 1.0
MODULE_TYPE = HOST_APPLICATION
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64 AARCH64
#
[Sources]
Ip6DxeGoogleTest.cpp
Ip6OptionGoogleTest.cpp
../Ip6Option.c
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
NetworkPkg/NetworkPkg.dec
[LibraryClasses]
GoogleTestLib
DebugLib
NetLib
PcdLib
[Protocols]
gEfiDhcp6ServiceBindingProtocolGuid
[Pcd]
gEfiNetworkPkgTokenSpaceGuid.PcdDhcp6UidType
[Guids]
gZeroGuid