From: Yu Watanabe Date: Fri, 7 Feb 2020 04:35:29 +0000 (+0900) Subject: network: fix ABRT X-Git-Tag: v245-rc2~70^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F14805%2Fhead;p=thirdparty%2Fsystemd.git network: fix ABRT Fixes #14811 and oss-fuzz#20548. --- diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c index 0b160bdfe64..4bdc26a38fc 100644 --- a/src/network/networkd-ndisc.c +++ b/src/network/networkd-ndisc.c @@ -999,7 +999,13 @@ int config_parse_address_generation_type( else { token->address_generation_type = IPV6_TOKEN_ADDRESS_GENERATION_STATIC; p = rvalue; - } + } + + if (isempty(p)) { + log_syntax(unit, LOG_ERR, filename, line, 0, + "Invalid IPv6Token= , ignoring assignment: %s", rvalue); + return 0; + } r = in_addr_from_string(AF_INET6, p, &buffer); if (r < 0) { diff --git a/test/fuzz/fuzz-network-parser/oss-fuzz-20548 b/test/fuzz/fuzz-network-parser/oss-fuzz-20548 new file mode 100644 index 00000000000..82efed50e06 Binary files /dev/null and b/test/fuzz/fuzz-network-parser/oss-fuzz-20548 differ