Cloudanix VulnDB

CVE-2024-1048

Low · 3.3

CVSS

3.3

EPSS

0.3%

Published

Feb 6, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A boot configuration tool can leave behind files that pile up and eventually make the computer run out of space if it gets interrupted.

Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
Low
Impact
Denial Of Service
Component
Application
Class
Denial of service
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The grub2-set-bootflag utility creates a temporary file with updated grubenv content and renames it, but leaves the temporary file behind if killed before the rename, allowing repeated invocations to exhaust filesystem inodes or blocks.

Why it matters to the business

Accumulation of orphaned temporary files can render affected systems unbootable or unusable by depleting storage resources, leading to operational downtime for systems relying on GRUB2.

How an attack unfolds

A local attacker repeatedly runs the utility and terminates it before the rename completes, causing temporary files to accumulate until the filesystem has no free inodes or blocks.

How to fix it

Upgrade GRUB2 to a version that ensures temporary files are cleaned up on interruption; monitor and manually remove orphaned temporary files in the GRUB environment directory until patched.

How to confirm the fix worked

Confirm that invocations of grub2-set-bootflag under interruption no longer leave behind temporary files and that filesystem free space remains stable.

Typical attack path

  1. Obtain local user access on an affected system
  2. Repeatedly invoke grub2-set-bootflag
  3. Kill the process before the rename operation completes
  4. Repeat until filesystem resources are exhausted

How to detect it

Inspect system logs and GRUB directories for repeated creation of temporary grubenv files without corresponding renames or cleanup, and monitor for abnormal termination of the utility.

  • /boot/grub2/grubenv.tmp
  • grub2-set-bootflag.*killed
  • excessive temporary files in /boot/grub2

What your security team should do

  • Prioritize patching GRUB2 packages in all affected distributions
  • Add filesystem monitoring for temporary file accumulation in GRUB directories
  • Restrict execution permissions on grub2-set-bootflag where possible

The record

A flaw was found in the grub2-set-bootflag utility of grub2. After the fix of CVE-2019-14865, grub2-set-bootflag will create a temporary file with the new grubenv content and rename it to the original grubenv file. If the program is killed before the rename operation, the temporary file will not be removed and may fill the filesystem when invoked multiple times, resulting in a filesystem out of free inodes or blocks.

Affected packages

Ecosystem Package Introduced Fixed
AlmaLinux:8 grub2-common 0 1:2.02-156.el8.alma.1
AlmaLinux:8 grub2-efi-aa64 0 1:2.02-156.el8.alma.1
AlmaLinux:8 grub2-efi-aa64-cdboot 0 1:2.02-156.el8.alma.1
AlmaLinux:8 grub2-efi-aa64-modules 0 1:2.02-156.el8.alma.1
AlmaLinux:8 grub2-efi-ia32 0 1:2.02-156.el8.alma.1
AlmaLinux:8 grub2-efi-ia32-cdboot 0 1:2.02-156.el8.alma.1
AlmaLinux:8 grub2-efi-ia32-modules 0 1:2.02-156.el8.alma.1
AlmaLinux:8 grub2-efi-x64 0 1:2.02-156.el8.alma.1
AlmaLinux:8 grub2-efi-x64-cdboot 0 1:2.02-156.el8.alma.1
AlmaLinux:8 grub2-efi-x64-modules 0 1:2.02-156.el8.alma.1
AlmaLinux:8 grub2-pc 0 1:2.02-156.el8.alma.1
AlmaLinux:8 grub2-pc-modules 0 1:2.02-156.el8.alma.1
AlmaLinux:8 grub2-ppc64le 0 1:2.02-156.el8.alma.1
AlmaLinux:8 grub2-ppc64le-modules 0 1:2.02-156.el8.alma.1
AlmaLinux:8 grub2-tools 0 1:2.02-156.el8.alma.1
AlmaLinux:8 grub2-tools-efi 0 1:2.02-156.el8.alma.1
AlmaLinux:8 grub2-tools-extra 0 1:2.02-156.el8.alma.1
AlmaLinux:8 grub2-tools-minimal 0 1:2.02-156.el8.alma.1
AlmaLinux:9 grub2-common 0 1:2.06-77.el9.alma.1
AlmaLinux:9 grub2-efi-aa64 0 1:2.06-77.el9.alma.1
AlmaLinux:9 grub2-efi-aa64-cdboot 0 1:2.06-77.el9.alma.1
AlmaLinux:9 grub2-efi-aa64-modules 0 1:2.06-77.el9.alma.1
AlmaLinux:9 grub2-efi-x64 0 1:2.06-77.el9.alma.1
AlmaLinux:9 grub2-efi-x64-cdboot 0 1:2.06-77.el9.alma.1
AlmaLinux:9 grub2-efi-x64-modules 0 1:2.06-77.el9.alma.1
AlmaLinux:9 grub2-pc 0 1:2.06-77.el9.alma.1
AlmaLinux:9 grub2-pc-modules 0 1:2.06-77.el9.alma.1
AlmaLinux:9 grub2-ppc64le 0 1:2.06-77.el9.alma.1
AlmaLinux:9 grub2-ppc64le-modules 0 1:2.06-77.el9.alma.1
AlmaLinux:9 grub2-tools 0 1:2.06-77.el9.alma.1
AlmaLinux:9 grub2-tools-efi 0 1:2.06-77.el9.alma.1
AlmaLinux:9 grub2-tools-extra 0 1:2.06-77.el9.alma.1
AlmaLinux:9 grub2-tools-minimal 0 1:2.06-77.el9.alma.1
Mageia:9 grub2 0 2.06-28.2.mga9
Red Hat:enterprise_linux:8::baseos grub2 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-common 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-debuginfo 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-debugsource 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-efi-aa64 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-efi-aa64-cdboot 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-efi-aa64-modules 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-efi-ia32 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-efi-ia32-cdboot 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-efi-ia32-modules 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-efi-x64 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-efi-x64-cdboot 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-efi-x64-modules 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-pc 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-pc-modules 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-ppc64le 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-ppc64le-modules 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-tools 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-tools-debuginfo 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-tools-efi 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-tools-efi-debuginfo 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-tools-extra 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-tools-extra-debuginfo 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-tools-minimal 0 1:2.02-156.el8
Red Hat:enterprise_linux:8::baseos grub2-tools-minimal-debuginfo 0 1:2.02-156.el8
Red Hat:enterprise_linux:9::baseos grub2 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-common 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-debuginfo 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-debugsource 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-efi-aa64 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-efi-aa64-cdboot 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-efi-aa64-modules 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-efi-x64 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-efi-x64-cdboot 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-efi-x64-modules 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-emu-debuginfo 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-pc 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-pc-modules 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-ppc64le 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-ppc64le-modules 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-tools 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-tools-debuginfo 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-tools-efi 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-tools-efi-debuginfo 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-tools-extra 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-tools-extra-debuginfo 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-tools-minimal 0 1:2.06-77.el9
Red Hat:enterprise_linux:9::baseos grub2-tools-minimal-debuginfo 0 1:2.06-77.el9
Rocky Linux:8 grub2 0 1:2.02-156.el8.rocky.0.1

Related vulnerabilities