TvÄ sÄrbarheter i GRUB2 som gör det möjligt att kringgÄ UEFI Secure Boot

Information has been revealed about two vulnerabilities in the GRUB2 bootloader that could lead to code execution when using specially crafted fonts and processing certain Unicode sequences. These vulnerabilities can be exploited to bypass the UEFI Secure Boot verification mechanism.

UpptÀckta sÄrbarheter:

  • CVE-2022-2601 — a buffer overflow in the grub_font_construct_glyph() function when processing specially crafted fonts in pf2 format, caused by an incorrect calculation of the max_glyph_size parameter and allocating a memory area that is intentionally smaller than needed to store the glyphs.
  • CVE-2022-3775 — out-of-bounds write when rendering certain Unicode sequences with a specially crafted font. The issue is present in the font processing code and is caused by a lack of proper checks matching the width and height of the glyph to the size of the existing bitmap. An attacker can craft input to trigger a write of the data tail beyond the allocated buffer. It is noted that despite the complexity of exploiting the vulnerability, achieving code execution is not ruled out.

A fix has been released in the form of a patch. The status of vulnerability fixing in distributions can be assessed on the following pages: Ubuntu, SUSE, RHEL, Fedora, Debian. Simply updating the GRUB2 package is not enough to fix the issues; it is also necessary to create new internal digital signatures and update installers, bootloaders, kernel packages, fwupd firmware, and the shim layer.

I de flesta Linux-distributioner anvÀnds ett litet shim-lager, signerat av Microsoft, för verifierad boot i UEFI Secure Boot-lÀget. Detta lager verifierar GRUB2 med sin egen certifikat, vilket gör att distributionsutvecklare inte behöver signera varje kÀrn- och GRUB-uppdatering i Microsoft. SÄrbarheter i GRUB2 gör det möjligt att köra egen kod efter att shim har verifierats framgÄngsrikt, men före operativsystemets laddning, vilket innebÀr att man kan trÀnga in i förtroendekedjan i aktivt lÀge Secure Boot och fÄ full kontroll över den fortsatta bootprocessen, inklusive laddning av ett annat OS, modifiering av operativsystemets komponenter och kringgÄ skyddet Lockdown.

För att blockera sÄrbarheten utan att Äterkalla den digitala signaturen kan distributioner anvÀnda mekanismen SBAT (UEFI Secure Boot Advanced Targeting), vars stöd har implementerats för GRUB2, shim och fwupd i de flesta populÀra Linux-distributioner. SBAT har utvecklats i samarbete med Microsoft och innebÀr att ytterligare metadata som inkluderar information om tillverkare, produkt, komponent och version lÀggs till i exekverbara filer för UEFI. Dessa metadata signeras digitalt och kan separat ingÄ i listor över tillÄtna eller förbjudna komponenter för UEFI Secure Boot.

SBAT gör det möjligt att blockera anvÀndningen av digitala signaturer för specifika versionsnummer av komponenter utan att behöva Äterkalla nycklar för Secure Boot. Blockering av sÄrbarheter via SBAT krÀver inte anvÀndning av en lista över Äterkallade UEFI-certifikat (dbx), utan sker pÄ nivÄ av att ersÀtta den interna nyckeln för att skapa signaturer och uppdatera GRUB2, shim och andra bootartefakter som levereras med distributioner. Innan SBAT infördes var det obligatoriskt att uppdatera listan över Äterkallade certifikat (dbx, UEFI Revocation List) för att helt blockera sÄrbarheten, eftersom angriparen, oavsett vilken operativsystem som anvÀnds, kunde utnyttja en startbar enhet med en gammal sÄrbar version av GRUB2 som var certifierad med en digital signatur.

KĂ€lla: opennet.ru

Köp pĂ„litlig webbhotell med DDoS-skydd, VPS VDS-servrar đŸ”„ Köp pĂ„litlig webbhotell med DDoS-skydd, VPS VDS-servrar | ProHoster