CVE-2024-27413 efi/capsule-loader: fix incorrect allocation size

Medium 5.5 Published Updated

Incorrect memory allocation size in the Linux kernel EFI capsule loader can lead to memory corruption or crashes on 32-bit systems.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-27413?

CVE-2024-27413 is a medium-severity vulnerability in Debian Debian Linux, published on 17 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

efi/capsule-loader: fix incorrect allocation size

gcc-14 notices that the allocation with sizeof(void) on 32-bit architectures is not enough for a 64-bit phys_addr_t:

drivers/firmware/efi/capsule-loader.c: In function 'efi_capsule_open': drivers/firmware/efi/capsule-loader.c:295:24: error: allocation of insufficient size '4' for type 'phys_addr_t' {aka 'long long unsigned int'} with size '8' [-Werror=alloc-size] 295 | cap_info->phys = kzalloc(sizeof(void *), GFP_KERNEL); | ^

Use the correct type instead here.

Which versions are affected by CVE-2024-27413?

It affects 2 products.

Products include Debian Debian Linux, Linux kernel.

How do I fix CVE-2024-27413?

Apply the vendor's patch.

Is CVE-2024-27413 being exploited?

There is no known exploitation of CVE-2024-27413 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as BELL-CVE-2024-27413, DEBIAN-CVE-2024-27413, GHSA-cv2p-mqwj-vfxc, UBUNTU-CVE-2024-27413.

Is CVE-2024-27413 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free