Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Sep 2017 16:06:32 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 222077] geli(8) writing uninitialized memory out to disk
Message-ID:  <bug-222077-8-aoS6BTkh9N@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-222077-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-222077-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222077

--- Comment #4 from Conrad Meyer <cem@freebsd.org> ---
(In reply to Maxim Khitrov from comment #3)
This issue is a userspace leak.  It comes from g_metadata_store() in the ge=
om
userspace code:

        fd =3D g_open(name, 1);
...
        sectorsize =3D g_sectorsize(fd);   // E.g., 4096
...
        assert(sectorsize >=3D (ssize_t)size);    // size =3D=3D metadata s=
ize, e.g.,
512
        sector =3D malloc(sectorsize);     // malloc doesn't zero contents
...
        bcopy(md, sector, size);         // only first size bytes are
initialized
        if (pwrite(fd, sector, sectorsize, mediasize - sectorsize) !=3D
            sectorsize) {
                                         // sectorsize bytes are written

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-222077-8-aoS6BTkh9N>