From: "cron2 (Code Review)" Date: Wed, 29 Oct 2025 07:10:43 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="5OdRe/o1mao="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: zeroize struct image in packet_id_persist_save() before writing to disk List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --5OdRe/o1mao= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello flichtenheld, plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1323?usp=3Demail to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+2 by flichtenheld Change subject: zeroize struct image in packet_id_persist_save() before wri= ting to disk ...................................................................... zeroize struct image in packet_id_persist_save() before writing to disk while this really is only a debug function, ensuring that no uninitialized heap content ends up in padding in the structure and thus to disk is good practice. Reported-by: Joshua Rogers Found-by: ZeroPath (https://zeropath.com/) Change-Id: I7f4c7b0ca748975defca1e5104e7077a761cd49c Signed-off-by: Gert Doering Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1323 Message-Id: <20251028203156.11697-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg33= 983.html Signed-off-by: Gert Doering --- M src/openvpn/packet_id.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/23/1323/2 diff --git a/src/openvpn/packet_id.c b/src/openvpn/packet_id.c index 880eee1..08d9d9b 100644 --- a/src/openvpn/packet_id.c +++ b/src/openvpn/packet_id.c @@ -511,6 +511,7 @@ && (p->time !=3D p->time_last_written || p->id !=3D p->id_last_wri= tten)) { struct packet_id_persist_file_image image; + CLEAR(image); ssize_t n; off_t seek_ret; struct gc_arena gc =3D gc_new(); -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1323?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I7f4c7b0ca748975defca1e5104e7077a761cd49c Gerrit-Change-Number: 1323 Gerrit-PatchSet: 2 Gerrit-Owner: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --5OdRe/o1mao= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 upl= oaded patch set #2 to this change.

View Change

The followi= ng approvals got outdated and were removed: Code-Review+2 by flichtenheld

zeroize struct image in pack=
et_id_persist_save() before writing to disk

while this really is onl= y a debug function, ensuring that no uninitialized
heap content ends up = in padding in the structure and thus to disk is good
practice.

Re= ported-by: Joshua Rogers <contact@...2949...>
Found-by: ZeroPath (= https://zeropath.com/)

Change-Id: I7f4c7b0ca748975defca1e5104e7077a7= 61cd49c
Signed-off-by: Gert Doering <gert@...1296...>
Acked-by:= Frank Lichtenheld <frank@...2641...>
Gerrit URL: https://gerrit.o= penvpn.net/c/openvpn/+/1323
Message-Id: <20251028203156.11697-1-gert@= ...1296...>
URL: https://www.mail-archive.com/openvpn-devel@...1885...= rceforge.net/msg33983.html
Signed-off-by: Gert Doering <gert@...1725...= ..>
---
M src/openvpn/packet_id.c
1 file changed, 1 insertion(+= ), 0 deletions(-)

git pull ssh://gerrit.openvpn.=
net:29418/openvpn refs/changes/23/1323/2
diff --git a/src/openvpn/p=
acket_id.c b/src/openvpn/packet_id.c
index 880eee1..08d9d9b= 100644
--- a/src/openvpn/packet_id.c
+++ b= /src/openvpn/packet_id.c
@@ -511,6 +511,7 @@
&& (p->time !=3D p->time_last_written || p->id = !=3D p->id_last_written))
{
= struct packet_id_persist_file_image image;
+ CLEAR(image);
ssi= ze_t n;
off_t seek_ret;
s= truct gc_arena gc =3D gc_new();

To view= , visit = change 1323. To unsubscribe, or for help writing mail filters, visit settings.

<= div itemscope itemtype=3D"http://schema.org/EmailMessage">
<= meta itemprop=3D"name" content=3D"View Change"/>
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7f4c7b0ca748975defca1e5104e= 7077a761cd49c
Gerrit-Change-Number: 1323
Gerrit-PatchSet: 2
Gerrit-Owner: cron2 <gert@...1296...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --5OdRe/o1mao=--