git: d95a73b4c7e3 - main - ifconfig: Fix segfault in geneve_status_nl
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 21 Apr 2026 12:22:36 UTC
The branch main has been updated by pouria:
URL: https://cgit.FreeBSD.org/src/commit/?id=d95a73b4c7e314084f838c7b68ae9da8e4ba2982
commit d95a73b4c7e314084f838c7b68ae9da8e4ba2982
Author: Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
AuthorDate: 2026-04-21 12:17:00 +0000
Commit: Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
CommitDate: 2026-04-21 12:17:00 +0000
ifconfig: Fix segfault in geneve_status_nl
Initialize nla_geneve_link structure to zero to prevent
segfault when a TLV is not received by the netlink parser.
Reported by: Seth Hoffert <seth.hoffert@gmail.com>
Fixes: 688e289ee904 ("ifconfig: Add support for geneve (netlink)")
---
sbin/ifconfig/ifgeneve.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sbin/ifconfig/ifgeneve.c b/sbin/ifconfig/ifgeneve.c
index db0e90e6f278..933610e08999 100644
--- a/sbin/ifconfig/ifgeneve.c
+++ b/sbin/ifconfig/ifgeneve.c
@@ -286,7 +286,7 @@ geneve_status_nl(if_ctx *ctx)
struct snl_writer nw;
struct nlmsghdr *hdr;
struct snl_errmsg_data errmsg;
- struct nla_geneve_link geneve_link;
+ struct nla_geneve_link geneve_link = {0};
char src[INET6_ADDRSTRLEN], dst[INET6_ADDRSTRLEN];
struct sockaddr *lsa, *rsa;
int mc;