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/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222077

--- 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 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.

help

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