Skip to content

Commit

Permalink
NetworkPkg: Dhcp6Dxe: SECURITY PATCH CVE-2023-45229 Unit Tests
Browse files Browse the repository at this point in the history
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4534

These tests confirm that the report bug...

"Out-of-bounds read when processing IA_NA/IA_TA options in a
DHCPv6 Advertise message"

..has been patched.

The following functions are tested to confirm an out of bounds read is
patched and that the correct statuses are returned:

Dhcp6SeekInnerOptionSafe
Dhcp6SeekStsOption

TCBZ4534
CVE-2023-45229
CVSS 6.5 : CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
CWE-125 Out-of-bounds Read

Cc: Saloni Kasbekar <[email protected]>
Cc: Zachary Clark-williams <[email protected]>

Signed-off-by: Doug Flick [MSFT] <[email protected]>
Reviewed-by: Saloni Kasbekar <[email protected]>
  • Loading branch information
Doug Flick via groups.io authored and mergify[bot] committed Feb 6, 2024
1 parent 1dbb10c commit 0736276
Show file tree
Hide file tree
Showing 5 changed files with 424 additions and 3 deletions.
2 changes: 1 addition & 1 deletion NetworkPkg/Dhcp6Dxe/Dhcp6Io.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ Dhcp6SeekStsOption (
// IA option to the end of the DHCP6 option area, thus subtract the space
// up until this option
//
OptionLen = OptionLen - (*Option - Packet->Dhcp6.Option);
OptionLen = OptionLen - (UINT32)(*Option - Packet->Dhcp6.Option);

//
// Seek the inner option
Expand Down
1 change: 1 addition & 0 deletions NetworkPkg/Dhcp6Dxe/GoogleTest/Dhcp6DxeGoogleTest.inf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
[Sources]
Dhcp6DxeGoogleTest.cpp
Dhcp6IoGoogleTest.cpp
Dhcp6IoGoogleTest.h
../Dhcp6Io.c
../Dhcp6Utility.c

Expand Down
Loading

0 comments on commit 0736276

Please sign in to comment.