| Message ID | 20261123112558.15625-1-gert@greenie.muc.de |
|---|---|
| State | New |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net>
Delivered-To: patchwork@openvpn.net
Received: by 2002:a05:6022:91c9:10b0:11b:d6c:f273 with SMTP id
tl9-n1csp2593465lad;
Mon, 23 Nov 2026 03:26:10 -0800 (PST)
X-Forwarded-Encrypted: i=2;
AL+hErFQVxoTVmBMBt08R0TTMVr70Lpx+dxtBFdzVK4YGNOOi8gvFeEemuc1tmQlYtVSXIY6WUfDsQO4Vx4=@openvpn.net
X-Received: by 2002:a05:7300:5994:b0:386:a915:8b97 with SMTP id
5a478bee46e88-386a9158dcamr5409292eec.27.1795433170098;
Mon, 23 Nov 2026 03:26:10 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1795433170; cv=none;
d=google.com; s=arc-20260327;
b=PMjharNemupKMU5dsFTUuM7Ag7gc8EnO2TKb5V1FtwwXV3Jab05nQcN7BUgDly+t/i
T4E8RLREXSXJ+dfGYrdbFF4z3/KdGRsV50ycLFDHAApjWPs6xIkaRZ7A2oEb5C29SV/p
URh8So4JdJukjkcizORic6gxwYR3/wMNnbl4QAyMXhyYQfmQRtqIVUXxN5IKofjDWuKZ
FLIkPe+YPe70+a61dgBjnPR4XMM97xD8wUDar8OFQUmwG9EqVg0kxTODdUHo76hsuCcx
PsY+IItvkwJrwvTw2rmifEHIjk1GOX2kkD2CJ0+ai6KhvwyvnWp1g2QEbV2Dz0oEGLuL
X8xA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20260327;
h=errors-to:content-transfer-encoding:list-subscribe:list-help
:list-post:list-archive:list-unsubscribe:list-id:precedence:subject
:mime-version:references:in-reply-to:message-id:date:to:from
:dkim-signature:dkim-signature:dkim-signature;
bh=hFC6KU0VQ7pfP6rQ/9aviPaH4ytokVnhJ2nFi/x4b9c=;
fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=;
b=QbGTjUsXrbTcLR0AHAp5wXJI1yxbaF+4hBsUPHyFc2j6YuiIlRNi8iizvGuRwH1eMl
PPM0Xs+96vl38QAI5UPU/LT2IAdj6BItmZWM9d+MLcsqJezXhZFrbXb3irT5PyBuJ35N
S/xcQkG2DPLgmcnMv2GSl6HmT29vwZwtvtHehJNQBxiN1phIuP4X+ZVG8dPHv1UXNROo
Ddvkfgi2ayUthp+822mGfh7nCg+TWYUbTH4KrefG+CkVJ3UBqPTA1WnxpNUED4qvYvDq
X3XjabC20PoeZ+TKzRdOyn+0wZOXeEXu/hkZdnUfDYjQmqAmjmquLPCv6pe1itYxzZj1
Vcdg==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=H3RI+ONv;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=IIEafSTe;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=NxLLyh6s;
spf=pass (google.com: domain of
openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as
permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net;
dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de
Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7])
by mx.google.com with ESMTPS id
5a478bee46e88-38566ad55a0si32341630eec.19.2026.11.23.03.26.09
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Mon, 23 Nov 2026 03:26:10 -0800 (PST)
Received-SPF: pass (google.com: domain of
openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as
permitted sender) client-ip=216.105.38.7;
Authentication-Results: mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=H3RI+ONv;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=IIEafSTe;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=NxLLyh6s;
spf=pass (google.com: domain of
openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as
permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net;
dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:
List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:
Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender:
Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:
Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post:
List-Owner; bh=hFC6KU0VQ7pfP6rQ/9aviPaH4ytokVnhJ2nFi/x4b9c=; b=H3RI+ONvk9FGCc
SuarHLnq7hu2mqlH220nAmDYCmVFUUfEhBboe0lOmoGwOlFz1mHhGOfGETOH8CyQCpdu6SlayjxhC
/bN/FlCoiKuJFCULW777eCRj07ESawTQBnd8dTC8zlhJ/4KqMsYZU/qqcTe3xyu/MHdxwhnVbn3+g
JjA=;
Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com)
by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.100.1)
(envelope-from <openvpn-devel-bounces@lists.sourceforge.net>)
id 1xVSBV-000000000Sl-0uaD;
Mon, 23 Nov 2026 11:26:09 +0000
Received: from [172.30.29.66] (helo=mx.sourceforge.net)
by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.100.1)
(envelope-from <gert@blue4.greenie.muc.de>)
id 1xVSBT-000000000SS-0v3B for openvpn-devel@lists.sourceforge.net;
Mon, 23 Nov 2026 11:26:07 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References:
In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:
Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
List-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive;
bh=oav+tdrTQITjW2AtRf2i27ZsiB1QcKG1czDRJ1WpJpM=; b=IIEafSTeQsIHip2aKxwwGmI+/X
mDU+EQm6xEOZmKO1mc8ETfzYBXdCwqAmbQRC4RbHxWIZeo8Kg9KSXR+3eGGuNFInqbxBiCoRBv81x
mD1ychU5RKKopz9ZFqQSon6W1vq/lYYYaq0FMqMA54KjEpKcaGbrgyIN/tiTCa+/oJsk=;
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x
;
h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:
Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=oav+tdrTQITjW2AtRf2i27ZsiB1QcKG1czDRJ1WpJpM=; b=NxLLyh6sUgHhI86/pJJfTJEdkl
iN0sn/9Fu2yZs6AKpu/vn6TDiDn0P5Zc77xXWY0woiPVGOg1tsbDORuA+1T/Qd7TrC2HdW35zqTst
e4DLf/UcQgpsuVILcRvaOeQZUVwKbCkphnoDJJGzBoPTwByj6b2G4NOsWjzwJgbeUsIk=;
Received: from [193.149.48.129] (helo=blue.greenie.muc.de)
by sfi-mx-2.v28.lw.sourceforge.com with esmtps
(TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1)
id 1xVSBR-000000006UG-492q for openvpn-devel@lists.sourceforge.net;
Mon, 23 Nov 2026 11:26:07 +0000
Received: from blue.greenie.muc.de (localhost [127.0.0.1])
by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 6ANBPwui015641
for <openvpn-devel@lists.sourceforge.net>; Mon, 23 Nov 2026 12:25:58 +0100
Received: (from gert@localhost)
by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6ANBPwVq015640
for openvpn-devel@lists.sourceforge.net; Mon, 23 Nov 2026 12:25:58 +0100
From: Gert Doering <gert@greenie.muc.de>
To: openvpn-devel@lists.sourceforge.net
Date: Mon, 23 Nov 2026 12:25:52 +0100
Message-ID: <20261123112558.15625-1-gert@greenie.muc.de>
X-Mailer: git-send-email 2.55.0
In-Reply-To:
<gerrit.1795430074000.Ic3efcdb7bc4e60a81b9292adfe7f8e22b86e274a@gerrit.openvpn.net>
References:
<gerrit.1795430074000.Ic3efcdb7bc4e60a81b9292adfe7f8e22b86e274a@gerrit.openvpn.net>
MIME-Version: 1.0
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software,
running on the system "sfi-spamd-2.hosts.colo.sdot.me",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: From: Razvan Cojocaru <razvanc@mailbox.org> addrlist_match()
cast each remote list entry to the peer's address family without checking
ai_family. With a dual-stack remote list, an IPv6 peer compared against an
IPv4 entry read past the end of it [...]
Content analysis details: (1.3 points, 5.0 required)
pts rule name description
---- ----------------------
--------------------------------------------------
1.3 RDNS_NONE Delivered to internal network by a host with no rDNS
X-Headers-End: 1xVSBR-000000006UG-492q
Subject: [Openvpn-devel] [PATCH v1] socket: check the address family in
addrlist_match()
X-BeenThere: openvpn-devel@lists.sourceforge.net
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <openvpn-devel.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive:
<http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel>
List-Post: <mailto:openvpn-devel@lists.sourceforge.net>
List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: openvpn-devel-bounces@lists.sourceforge.net
X-getmail-retrieved-from-mailbox: Inbox
X-GMAIL-THRID: 1882648131767744971
X-GMAIL-MSGID: 1882648131767744971
|
| Series |
[Openvpn-devel,v1] socket: check the address family in addrlist_match()
|
|
Commit Message
Gert Doering
Nov. 23, 2026, 11:25 a.m. UTC
From: Razvan Cojocaru <razvanc@mailbox.org> addrlist_match() cast each remote list entry to the peer's address family without checking ai_family. With a dual-stack remote list, an IPv6 peer compared against an IPv4 entry read past the end of its sockaddr_in, and 0.0.0.0 matched any IPv6 entry. Skip entries of the other family, as addrlist_port_match() already does. Change-Id: Ic3efcdb7bc4e60a81b9292adfe7f8e22b86e274a (cherry picked from commit 756d140aca1958f71a701b4179e2e59fd3d86ead) Signed-off-by: Razvan Cojocaru <razvanc@mailbox.org> Acked-by: Gert Doering <gert@greenie.muc.de> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2326 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to release/2.6. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2326 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering <gert@greenie.muc.de>
Comments
Direct backport of commit 756d140aca1, just taking the not-yet-rearranged
socket* source files into account.
This is a bug that could possibly lead to a heap memory over-read of
12 bytes, so it needed fixing. We haven't been able to make anything
crash or otherwise "interesting", so no CVE.
BB tested this (and failed on some combinations of platform and TLS
library, "because 2.6", and on others because "t_client.rc and 2.6"),
and GHA tested this as well.
Your patch has been applied to the release/2.6 branch.
commit 3256f39106ad04d744f8db6633e42b616891a242
Author: Razvan Cojocaru
Date: Mon Nov 23 12:25:52 2026 +0100
socket: check the address family in addrlist_match()
Signed-off-by: Razvan Cojocaru <razvanc@mailbox.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2326
Message-Id: <20261123112558.15625-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg41809.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
diff --git a/src/openvpn/socket.h b/src/openvpn/socket.h index 47083ad..80f09a3 100644 --- a/src/openvpn/socket.h +++ b/src/openvpn/socket.h @@ -736,6 +736,10 @@ const struct addrinfo *curele; for (curele = addrlist; curele; curele = curele->ai_next) { + if (a1->addr.sa.sa_family != curele->ai_family) + { + continue; + } switch (a1->addr.sa.sa_family) { case AF_INET: