[Bug 264021] efi: failed to allocate staging area: 9

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 21 May 2022 02:14:29 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264021

--- Comment #11 from Mark Millard <marklmi26-fbsd@yahoo.com> ---
(In reply to Mark Millard from comment #10)

Hmm:

void
geli_export_key_metadata(struct preloaded_file *kfp)
{
    struct keybuf *keybuf;

    keybuf = malloc(GELI_KEYBUF_SIZE);
    geli_export_key_buffer(keybuf);
    file_addmetadata(kfp, MODINFOMD_KEYBUF, GELI_KEYBUF_SIZE, keybuf);
    explicit_bzero(keybuf, GELI_KEYBUF_SIZE);
    free(keybuf);
}

No possibility of malloc failure and a bad-to-use
keybuf value? (But I'm not literate about the libsa
expectations for how things operate.)

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