From: "cron2 (Code Review)" Date: Wed, 29 Oct 2025 07:10:45 +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="Q+XQEL4yF0I="; 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: , Cc: flichtenheld , plaisthos , openvpn-devel --Q+XQEL4yF0I= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/13= 23?usp=3Demail ) 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(-) 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: merged 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 --Q+XQEL4yF0I= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 sub= mitted this change.

View Change

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 st= ructure and thus to disk is good
practice.

Reported-by: Joshua Ro= gers <contact@...2949...>
Found-by: ZeroPath (https://zeropath.com= /)

Change-Id: I7f4c7b0ca748975defca1e5104e7077a761cd49c
Signed-of= f-by: Gert Doering <gert@...1296...>
Acked-by: Frank Lichtenheld &= lt;frank@...2641...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn= /+/1323
Message-Id: <20251028203156.11697-1-gert@...1296...>
UR= L: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg3398= 3.html
Signed-off-by: Gert Doering <gert@...1296...>
---
M s= rc/openvpn/packet_id.c
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/src/openvpn/packet_id.c b/src/openvpn/packet_id.cindex 880eee1..08d9d9b 100644
--- a/src/openvpn/pack= et_id.c
+++ b/src/openvpn/packet_id.c
@@ -5= 11,6 +511,7 @@
&& (p->time !=3D p->t= ime_last_written || p->id !=3D p->id_last_written))
= {
struct packet_id_persist_file_image image;
+ CLEAR(image);=
ssize_t n;
off_t seek_re= t;
struct gc_arena gc =3D gc_new();

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

Gerrit-MessageType: merged
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>
= --Q+XQEL4yF0I=--