Fix CVE-2023-45229、CVE-2023-45230、CVE-2023-45231、CVE-2023-45232、CVE-2023-45233、CVE-2023-45234、CVE-2023-45235 Signed-off-by: yexiao <yexiao7@huawei.com> (cherry picked from commit aa6a1dc11863945714f63746d5f1159ed3ede3e7)
54 lines
1.5 KiB
Diff
54 lines
1.5 KiB
Diff
From f656a38b052e4eb47a2a2fd1e53c979acdf74b03 Mon Sep 17 00:00:00 2001
|
|
From: Doug Flick <dougflick@microsoft.com>
|
|
Date: Tue, 13 Feb 2024 10:46:02 -0800
|
|
Subject: [PATCH 18/19] NetworkPkg: Dhcp6Dxe: Packet-Length is not updated
|
|
before appending
|
|
|
|
In order for Dhcp6AppendIaAddrOption (..) to safely append the IA
|
|
Address option, the Packet-Length field must be updated before appending
|
|
the option.
|
|
|
|
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>
|
|
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
|
|
|
|
reference: https://github.com/tianocore/edk2/pull/5372
|
|
Signed-off-by: yexiao <yexiao7@huawei.com>
|
|
---
|
|
NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c | 10 +++++-----
|
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c b/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c
|
|
index db9e02a1..7d4d5452 100644
|
|
--- a/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c
|
|
+++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c
|
|
@@ -924,6 +924,11 @@ Dhcp6AppendIaOption (
|
|
*PacketCursor += sizeof (T2);
|
|
}
|
|
|
|
+ //
|
|
+ // Update the packet length
|
|
+ //
|
|
+ Packet->Length += BytesNeeded;
|
|
+
|
|
//
|
|
// Fill all the addresses belong to the Ia
|
|
//
|
|
@@ -935,11 +940,6 @@ Dhcp6AppendIaOption (
|
|
}
|
|
}
|
|
|
|
- //
|
|
- // Update the packet length
|
|
- //
|
|
- Packet->Length += BytesNeeded;
|
|
-
|
|
//
|
|
// Fill the value of Ia option length
|
|
//
|
|
--
|
|
2.33.0
|
|
|