mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 10:51:20 +03:00
Merge pull request #10717 from yuwata/fix-oss-fuzz-11324
network: add missing verification for ip6gretap and sit
This commit is contained in:
commit
e29a9fcb29
@ -415,17 +415,17 @@ static int netdev_tunnel_verify(NetDev *netdev, const char *filename) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (IN_SET(netdev->kind, NETDEV_KIND_VTI, NETDEV_KIND_IPIP, NETDEV_KIND_GRE, NETDEV_KIND_GRETAP) &&
|
||||
if (IN_SET(netdev->kind, NETDEV_KIND_VTI, NETDEV_KIND_IPIP, NETDEV_KIND_SIT, NETDEV_KIND_GRE, NETDEV_KIND_GRETAP) &&
|
||||
(t->family != AF_INET || in_addr_is_null(t->family, &t->local))) {
|
||||
log_netdev_error(netdev,
|
||||
"vti/ipip/gre/gretap tunnel without a local IPv4 address configured in %s. Ignoring", filename);
|
||||
"vti/ipip/sit/gre/gretap tunnel without a local IPv4 address configured in %s. Ignoring", filename);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (IN_SET(netdev->kind, NETDEV_KIND_VTI6, NETDEV_KIND_IP6TNL, NETDEV_KIND_IP6GRE) &&
|
||||
if (IN_SET(netdev->kind, NETDEV_KIND_VTI6, NETDEV_KIND_IP6TNL, NETDEV_KIND_IP6GRE, NETDEV_KIND_IP6GRETAP) &&
|
||||
(t->family != AF_INET6 || in_addr_is_null(t->family, &t->local))) {
|
||||
log_netdev_error(netdev,
|
||||
"vti6/ip6tnl/ip6gre tunnel without a local IPv6 address configured in %s. Ignoring", filename);
|
||||
"vti6/ip6tnl/ip6gre/ip6gretap tunnel without a local IPv6 address configured in %s. Ignoring", filename);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
BIN
test/fuzz/fuzz-netdev-parser/oss-fuzz-11324
Normal file
BIN
test/fuzz/fuzz-netdev-parser/oss-fuzz-11324
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user