public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Leif Lindholm" <quic_llindhol@quicinc.com>
To: <devel@edk2.groups.io>, <dougflick@microsoft.com>
Cc: Saloni Kasbekar <saloni.kasbekar@intel.com>,
	Zachary Clark-williams <zachary.clark-williams@intel.com>,
	"Doug Flick [MSFT]" <doug.edk2@gmail.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [PATCH v2 3/4] NetworkPkg: Dhcp6Dxe: Packet-Length is not updated before appending
Date: Tue, 13 Feb 2024 20:16:54 +0000	[thread overview]
Message-ID: <c15a6a65-868c-40be-a181-93f4ff84db91@quicinc.com> (raw)
In-Reply-To: <20240213184603.2985-4-doug.edk2@gmail.com>

On 2024-02-13 18:46, Doug Flick via groups.io wrote:
> From: Doug Flick <dougflick@microsoft.com>
> 
> 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: Leif Lindholm <quic_llindhol@quicinc.com>

Thanks for this!

> ---
>   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 e4e072562296..f38e3ee3fe1a 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
> 
>     //
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115413): https://edk2.groups.io/g/devel/message/115413
Mute This Topic: https://groups.io/mt/104339708/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-02-13 20:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-13 18:45 [edk2-devel] [PATCH v2 0/4] Corrects additional concern in NetworkPkg Doug Flick via groups.io
2024-02-13 18:46 ` [edk2-devel] [PATCH v2 1/4] NetworkPkg: Dhcp6Dxe: SECURITY PATCH CVE-2023-45229 Related Patch Doug Flick via groups.io
2024-02-13 21:51   ` Saloni Kasbekar
2024-02-13 23:31     ` Doug Flick via groups.io
2024-02-14  2:40       ` Michael D Kinney
2024-02-14  3:32         ` Michael D Kinney
2024-02-13 18:46 ` [edk2-devel] [PATCH v2 2/4] NetworkPkg: Dhcp6Dxe: Removes duplicate check and replaces with macro Doug Flick via groups.io
2024-02-13 18:46 ` [edk2-devel] [PATCH v2 3/4] NetworkPkg: Dhcp6Dxe: Packet-Length is not updated before appending Doug Flick via groups.io
2024-02-13 20:16   ` Leif Lindholm [this message]
2024-02-13 18:46 ` [edk2-devel] [PATCH v2 4/4] NetworkPkg: : Updating SecurityFixes.yaml Doug Flick via groups.io
2024-02-15 13:54   ` Rebecca Cran
2024-02-15 18:14     ` Doug Flick via groups.io
2024-02-13 20:18 ` [edk2-devel] [PATCH v2 0/4] Corrects additional concern in NetworkPkg Leif Lindholm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c15a6a65-868c-40be-a181-93f4ff84db91@quicinc.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox