]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
dumpon: fix encrypted dumps after commit 372557d8c3d
authorEric van Gyzen <vangyzen@FreeBSD.org>
Sat, 7 Aug 2021 08:59:02 +0000 (03:59 -0500)
committerEric van Gyzen <vangyzen@FreeBSD.org>
Wed, 11 Aug 2021 15:54:56 +0000 (10:54 -0500)
commit96f9bd46547d6dfbaf219ab449efacacb0dacccc
tree3ef232bbe47063a4c0d1447c671e5b1f9464c280
parent710c055673b3a39ff6e5fdf0bef49437d1e0c9a3
dumpon: fix encrypted dumps after commit 372557d8c3d

That commit moved key generation into a child process, including
a memory allocation referenced by a structure.  The child wrote
the structure to the parent over a pipe, but did not write the
referenced allocation.  The parent read the structure from the
child and used its pointer, which was bogus in the parent.

In the child, send both chunks of data to the parent.  In the
parent, make a corresponding allocation and read both chunks.

Fixes: 372557d8c3d37dd0c1d9be56513a436393963848
Reviewed by: bdrewery, markj
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D31452
sbin/dumpon/dumpon.c