[git commit] udhcpc6: ignore invalid OPTION_IAADDR
Denys Vlasenko
vda.linux at googlemail.com
Thu May 24 16:26:01 UTC 2018
commit: https://git.busybox.net/busybox/commit/?id=a174c791ece5d7f2869e9efd338d91c8ea10f609
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: David Decotigny <ddecotig at gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
networking/udhcp/d6_dhcpc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
index 9e3ce8b1c..2ff9c5669 100644
--- a/networking/udhcp/d6_dhcpc.c
+++ b/networking/udhcp/d6_dhcpc.c
@@ -287,6 +287,10 @@ static void option_to_env(uint8_t *option, uint8_t *option_end)
* | valid-lifetime |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
+ /* Make sure payload contains an address */
+ if (option[3] < 24)
+ break;
+
sprint_nip6(ipv6str, option + 4);
*new_env() = xasprintf("ipv6=%s", ipv6str);
More information about the busybox-cvs
mailing list