From 083a51f43ae30cd7f1ad1cc9977ca4bedfc35585 Mon Sep 17 00:00:00 2001 From: Louis Scalbert Date: Tue, 27 Jun 2023 18:00:02 +0200 Subject: ipoe: fix memory access violation with unset link-selection Link-selection pointer is not set to NULL when link-selection IPOE option is not set. It results in a memory access violation in dhcpv4_packet_insert_opt82() Set link-selection pointer to NULL if unset to fix the issue. Fixes: 61e31c591e ("ipoe: add dhcp link selection sub-option") Signed-off-by: Louis Scalbert --- accel-pppd/ctrl/ipoe/ipoe.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'accel-pppd/ctrl/ipoe') diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index 4a4f95d..dde3f21 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -4006,6 +4006,8 @@ static void load_config(void) opt = conf_get_opt("ipoe", "link-selection"); if (opt && inet_pton(AF_INET, opt, &dummy) > 0) conf_link_selection = opt; + else + conf_link_selection = NULL; opt = conf_get_opt("ipoe", "ipv6"); if (opt) -- cgit v1.2.3