Skip to content

Commit c58b6e7

Browse files
committed
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 <[email protected]> Found-by: ZeroPath (https://zeropath.com/) Change-Id: I7f4c7b0ca748975defca1e5104e7077a761cd49c Signed-off-by: Gert Doering <[email protected]> Acked-by: Frank Lichtenheld <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1323 Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg33983.html Signed-off-by: Gert Doering <[email protected]>
1 parent e6ae2bc commit c58b6e7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/openvpn/packet_id.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,7 @@ packet_id_persist_save(struct packet_id_persist *p)
511511
&& (p->time != p->time_last_written || p->id != p->id_last_written))
512512
{
513513
struct packet_id_persist_file_image image;
514+
CLEAR(image);
514515
ssize_t n;
515516
off_t seek_ret;
516517
struct gc_arena gc = gc_new();

0 commit comments

Comments
 (0)