summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptInternalFormat.h
diff options
context:
space:
mode:
authorMark_Wu <mark.wu1@dell.com>2026-06-03 06:08:41 +0300
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2026-10-15 06:11:10 +0300
commit36bd3ba62c914ed0d9a538a9fe9c1d186f737b1d (patch)
tree873d9f7384d8c0205a1e8508c001f4ba8f25de27 /MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptInternalFormat.h
parentfa789071ff0b29f1e568bfe153ef7f3d76bd60e4 (diff)
downloadedk2-36bd3ba62c914ed0d9a538a9fe9c1d186f737b1d.tar.xz
NetworkPkg/Ip6Dxe: Enforce RFC 4861 8-octet minimum in ND redirect parse
RFC 4861 Section 4.6 defines every Neighbor Discovery option length in units of 8 octets. Therefore, valid ND option regions must be consumed as an exact multiple of 8 bytes, and trailing 1-7 byte fragments are malformed. This change hardens ND option parsing in two place: 01. Ip6ProcessRedirect() in Ip6Nd.c - Change loop guard from: while (Length > 0) to while (Length >= 8) 02. Ip6IsNDOptionValid() in Ip6Option.c - Change loop guard from: while (Offset + sizeof (IP6_OPTION_HEADER) -1 < OptionLen) to while (Offset + 8 <= (UINT32)OptionLen) - Change final return from: return TRUE; to return (Offset == (UINT32)OptionLen); Together these updates reject malformed trailing fragments and preserve behavior for well-formed ND option retions. Signed-off-by: Mark Wu <mark.wu1@dell.com>
Diffstat (limited to 'MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptInternalFormat.h')
0 files changed, 0 insertions, 0 deletions