audk/NetworkPkg/Dhcp6Dxe
Doug Flick via groups.io f31453e8d6 NetworkPkg: Dhcp6Dxe: SECURITY PATCH CVE-2023-45230 Patch
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4535

Bug Details:
PixieFail Bug #2
CVE-2023-45230
CVSS 8.3 : CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:H
CWE-119 Improper Restriction of Operations within the Bounds
 of a Memory Buffer

Changes Overview:
> -UINT8 *
> +EFI_STATUS
>  Dhcp6AppendOption (
> -  IN OUT UINT8   *Buf,
> -  IN     UINT16  OptType,
> -  IN     UINT16  OptLen,
> -  IN     UINT8   *Data
> +  IN OUT EFI_DHCP6_PACKET  *Packet,
> +  IN OUT UINT8             **PacketCursor,
> +  IN     UINT16            OptType,
> +  IN     UINT16            OptLen,
> +  IN     UINT8             *Data
>    );

Dhcp6AppendOption() and variants can return errors now.  All callsites
are adapted accordingly.

It gets passed in EFI_DHCP6_PACKET as additional parameter ...

> +  //
> +  // Verify the PacketCursor is within the packet
> +  //
> +  if (  (*PacketCursor < Packet->Dhcp6.Option)
> +     || (*PacketCursor >= Packet->Dhcp6.Option +
 (Packet->Size - sizeof (EFI_DHCP6_HEADER))))
> +  {
> +    return EFI_INVALID_PARAMETER;
> +  }

... so it can look at Packet->Size when checking buffer space.
Also to allow Packet->Length updates.

Lots of checks added.

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>
2024-02-06 19:24:26 +00:00
..
ComponentName.c NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Dhcp6Driver.c NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Dhcp6Driver.h NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Dhcp6Dxe.inf NetworkPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:15 -07:00
Dhcp6Dxe.uni NetworkPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:15 -07:00
Dhcp6DxeExtra.uni NetworkPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:15 -07:00
Dhcp6Impl.c NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Dhcp6Impl.h NetworkPkg: Dhcp6Dxe: SECURITY PATCH CVE-2023-45230 Patch 2024-02-06 19:24:26 +00:00
Dhcp6Io.c NetworkPkg: Dhcp6Dxe: SECURITY PATCH CVE-2023-45230 Patch 2024-02-06 19:24:26 +00:00
Dhcp6Io.h NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Dhcp6Utility.c NetworkPkg: Dhcp6Dxe: SECURITY PATCH CVE-2023-45230 Patch 2024-02-06 19:24:26 +00:00
Dhcp6Utility.h NetworkPkg: Dhcp6Dxe: SECURITY PATCH CVE-2023-45230 Patch 2024-02-06 19:24:26 +00:00