Skip to content

Commit 1fafcd5

Browse files
Flickdmjgarver
authored andcommitted
NetworkPkg: Ip6Dxe: SECURITY PATCH CVE-2023-45231 Patch
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4536 PixieFail Bug #3 CVE-2023-45231 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 Out-of-bounds read when handling a ND Redirect message with truncated options Change Overview: Adds a check to prevent truncated options from being parsed + // + // Cannot process truncated options. + // Cannot process options with a length of 0 as there is no Type field. + // + if (OptionLen < sizeof (IP6_OPTION_HEADER)) { + return FALSE; + } 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]> Reviewed-by: Jeff Brasen <[email protected]> Tested-by: Jeff Brasen <[email protected]>
1 parent 98ed8cd commit 1fafcd5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

NetworkPkg/Ip6Dxe/Ip6Option.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,14 @@ Ip6IsNDOptionValid (
137137
return FALSE;
138138
}
139139

140+
//
141+
// Cannot process truncated options.
142+
// Cannot process options with a length of 0 as there is no Type field.
143+
//
144+
if (OptionLen < sizeof (IP6_OPTION_HEADER)) {
145+
return FALSE;
146+
}
147+
140148
Offset = 0;
141149

142150
//

0 commit comments

Comments
 (0)