From: "cron2 (Code Review)" Date: Tue, 28 Oct 2025 18:36:23 +0000 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="To2x91FfucI="; 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 --To2x91FfucI= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1323?usp=3Demail to review the following change. 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 --- 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/1 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: newchange Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I7f4c7b0ca748975defca1e5104e7077a761cd49c Gerrit-Change-Number: 1323 Gerrit-PatchSet: 1 Gerrit-Owner: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld --To2x91FfucI= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: flichtenheld, plaisthos.

cron2 would like plaisthos and flichtenheld to review t= his change.

V= iew Change

zeroize struct image in packet_id_persist_s=
ave() before writing to disk

while this really is only a debug funct= ion, ensuring that no uninitialized
heap content ends up in padding in t= he structure and thus to disk is good
practice.

Reported-by: Josh= ua Rogers <contact@...2949...>
Found-by: ZeroPath (https://zeropat= h.com/)

Change-Id: I7f4c7b0ca748975defca1e5104e7077a761cd49c
Sign= ed-off-by: Gert Doering <gert@...1296...>
---
M src/openvpn/pac= ket_id.c
1 file changed, 1 insertion(+), 0 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/23/= 1323/1
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_written))
{
struct packet_id_persist_file_im= age image;
+ C= LEAR(image);
ssize_t n;
o= ff_t seek_ret;
struct gc_arena gc =3D gc_new();

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

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7f4c7b0ca748975defca1e5104e= 7077a761cd49c
Gerrit-Change-Number: 1323
Gerrit-PatchSet: 1
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>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
= --To2x91FfucI=--