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

--- Comment #4 from Conrad Meyer <c...@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.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to