diff options
| author | Frédéric Desbiens <[email protected]> | 2025-09-29 08:57:02 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-09-29 08:57:02 +0100 |
| commit | 8299589dedd2737c0f1f25b2f6cbd8047cfd9b02 (patch) | |
| tree | 2304843be4f44e33a3c44860d255bf573a85c213 | |
| parent | 1da62980431c21a46c0df33ceea736bd15bb47c8 (diff) | |
| parent | adbb3a231a04567da8db6010836664b3da242adb (diff) | |
Merge commit from fork
Insert a index position check before getting bytes
| -rw-r--r-- | addons/dhcp/nxd_dhcpv6_client.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/dhcp/nxd_dhcpv6_client.c b/addons/dhcp/nxd_dhcpv6_client.c index 7486fe66..e7ffa741 100644 --- a/addons/dhcp/nxd_dhcpv6_client.c +++ b/addons/dhcp/nxd_dhcpv6_client.c @@ -5811,6 +5811,12 @@ ULONG temp_lsw = 0; index += 4; } + /* Check option length for 4 bytes lsw. */ + if (index + 4 > option_length) + { + return(NX_DHCPV6_INVALID_SERVER_DUID); + } + /* Yes; Extract the link local address lsw which should be the next 4 bytes. */ _nx_dhcpv6_utility_get_data((option_data + index), 4, &temp_lsw); |
