[PATCH v1] openvpnserv: fix off-by-one input validation

Gert Doering <[email protected]>
Newsgroups gmane.network.openvpn.devel
Message-ID <[email protected]>
From: Heiko Hund <[email protected]>

Code checked for a hypothetical third trailing NUL character,
instead of the second. Could read one extra octet beyond the buffer if
it is used up by the data completely.

Discovered and reported by BreachX Zero Day Labs, using Typhon AI Mil v2.
Contributing Researcher: Vivek Parikh.

Reported-by: Vivek Parikh <[email protected]>
CVE: 2026-78221
Change-Id: I1a181d65ad0d5e3765f57373a6ee223ede909dea
Signed-off-by: Heiko Hund <[email protected]>
Acked-by: Razvan Cojocaru <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1888
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1888
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Razvan Cojocaru <[email protected]>

        
diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c
index 0c6e23f..d2288b9 100644
--- a/src/openvpnserv/interactive.c
+++ b/src/openvpnserv/interactive.c
@@ -2959,7 +2959,7 @@
         const char *rdom = msg->resolve_domains;
         size_t rdom_size = sizeof(msg->resolve_domains);
         size_t rdom_len = strlen(rdom);
-        if (rdom_len && (rdom_len + 1 >= rdom_size || rdom[rdom_len + 2] != 0))
+        if (rdom_len && (rdom_len + 1 >= rdom_size || rdom[rdom_len + 1] != 0))
         {
             return ERROR_MESSAGE_DATA;
         }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.