audk/NetworkPkg/UefiPxeBcDxe
Doug Flick fac297724e NetworkPkg: UefiPxeBcDxe: SECURITY PATCH CVE-2023-45235 Patch
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4540

Bug Details:
PixieFail Bug #7
CVE-2023-45235
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

Buffer overflow when handling Server ID option from a DHCPv6 proxy
Advertise message

Change Overview:

Performs two checks

1. Checks that the length of the duid is accurate
> + //
> + // Check that the minimum and maximum requirements are met
> + //
> + if ((OpLen < PXEBC_MIN_SIZE_OF_DUID) ||
(OpLen > PXEBC_MAX_SIZE_OF_DUID)) {
> +  Status = EFI_INVALID_PARAMETER;
> +  goto ON_ERROR;
> + }

2. Ensures that the amount of data written to the buffer is tracked and
never exceeds that
> + //
> + // Check that the option length is valid.
> + //
> + if ((DiscoverLen + OpLen + PXEBC_COMBINED_SIZE_OF_OPT_CODE_AND_LEN)
 > DiscoverLenNeeded) {
> +     Status = EFI_OUT_OF_RESOURCES;
> +     goto ON_ERROR;
> + }

Additional code clean up and fix for memory leak in case Option was NULL

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
..
GoogleTest NetworkPkg: UefiPxeBcDxe: SECURITY PATCH CVE-2023-45234 Unit Tests 2024-02-06 19:24:26 +00:00
ComponentName.c NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PxeBcBoot.c NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PxeBcBoot.h NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PxeBcDhcp4.c NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PxeBcDhcp4.h NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PxeBcDhcp6.c NetworkPkg: UefiPxeBcDxe: SECURITY PATCH CVE-2023-45235 Patch 2024-02-06 19:24:26 +00:00
PxeBcDhcp6.h NetworkPkg: UefiPxeBcDxe: SECURITY PATCH CVE-2023-45235 Patch 2024-02-06 19:24:26 +00:00
PxeBcDriver.c NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PxeBcDriver.h NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PxeBcImpl.c NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PxeBcImpl.h NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PxeBcMtftp.c NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PxeBcMtftp.h NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PxeBcSupport.c NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PxeBcSupport.h NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiPxeBcDxe.inf NetworkPkg: Remove unnecessary MdeModulePkg/MdeModulePkg.dec dependency in INF 2019-10-08 09:20:34 +08:00
UefiPxeBcDxe.uni NetworkPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:15 -07:00
UefiPxeBcDxeExtra.uni NetworkPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:15 -07:00