A buffer overflow was found in grubfontconstructglyph(). A malicious crafted pf2 font can lead to an overflow when calculating the maxglyph_size value, allocating a smaller than needed buffer for the glyph, this further leads to a buffer overflow and a heap based out-of-bounds write. An attacker may use this vulnerability to circumvent the secure boot mechanism.