summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-07-05 11:28:55 -0400
committerTom Rini <trini@konsulko.com>2023-07-05 11:28:55 -0400
commite80f4079b3a3db0961b73fa7a96e6c90242d8d25 (patch)
tree5352d65d18b44e0982152654dc9f8018047e65ae /net
parent45f77b807c2f6b8da88ae897b7eb2238e25df36b (diff)
parente1bebc16e1d9aa0ddd56c53c0b781f7186dce557 (diff)
downloadu-boot-e80f4079b3a3db0961b73fa7a96e6c90242d8d25.tar.gz
u-boot-e80f4079b3a3db0961b73fa7a96e6c90242d8d25.tar.bz2
u-boot-e80f4079b3a3db0961b73fa7a96e6c90242d8d25.zip
Merge tag 'v2023.07-rc6' into next
Prepare v2023.07-rc6
Diffstat (limited to 'net')
-rw-r--r--net/dhcpv6.c5
-rw-r--r--net/dhcpv6.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/net/dhcpv6.c b/net/dhcpv6.c
index 0d1c600632..73a1067877 100644
--- a/net/dhcpv6.c
+++ b/net/dhcpv6.c
@@ -316,6 +316,11 @@ static void dhcp6_parse_options(uchar *rx_pkt, unsigned int len)
option_ptr = ((uchar *)option_hdr) + sizeof(struct dhcp6_hdr);
option_len = ntohs(option_hdr->option_len);
+ if (option_ptr + option_len > rx_pkt + len) {
+ debug("Invalid option length\n");
+ return;
+ }
+
switch (ntohs(option_hdr->option_id)) {
case DHCP6_OPTION_CLIENTID:
if (memcmp(option_ptr, sm_params.duid, option_len)
diff --git a/net/dhcpv6.h b/net/dhcpv6.h
index 80ca520432..65c8e4c71d 100644
--- a/net/dhcpv6.h
+++ b/net/dhcpv6.h
@@ -38,7 +38,7 @@
#define DUID_MAX_SIZE DUID_LL_SIZE /* only supports DUID-LL currently */
/* vendor-class-data to send in vendor clas option */
-#define DHCP6_VCI_STRING "U-boot"
+#define DHCP6_VCI_STRING "U-Boot"
#define DHCP6_MULTICAST_ADDR "ff02::1:2" /* DHCP multicast address */