[Bug 222077] geli(8) writing uninitialized memory out to disk
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Sep 7 16:06:33 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222077
--- Comment #4 from Conrad Meyer <cem at freebsd.org> ---
(In reply to Maxim Khitrov from comment #3)
This issue is a userspace leak. It comes from g_metadata_store() in the geom
userspace code:
fd = g_open(name, 1);
...
sectorsize = g_sectorsize(fd); // E.g., 4096
...
assert(sectorsize >= (ssize_t)size); // size == metadata size, e.g.,
512
sector = malloc(sectorsize); // malloc doesn't zero contents
...
bcopy(md, sector, size); // only first size bytes are
initialized
if (pwrite(fd, sector, sectorsize, mediasize - sectorsize) !=
sectorsize) {
// sectorsize bytes are written
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list