Skip to contentSkip to conversation

CVE-2024-43854: block: initialize integrity buffer to zero before writing it to media

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Aug 17, 2024

lore
Share & tools
lore
#0 lore raw

Description
===========

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

block: initialize integrity buffer to zero before writing it to media

Metadata added by bio_integrity_prep is using plain kmalloc, which leads to random kernel memory being written media. For PI metadata this is limited to the app tag that isn't used by kernel generated metadata, but for non-PI metadata the entire buffer leaks kernel memory.

Fix this by adding the __GFP_ZERO flag to allocations for writes.

The Linux kernel CVE team has assigned CVE-2024-43854 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 2.6.27 with commit 7ba1ba12eeef and fixed in 6.1.103 with commit d418313bd8f5
	Issue introduced in 2.6.27 with commit 7ba1ba12eeef and fixed in 6.6.44 with commit 23a19655fb56
	Issue introduced in 2.6.27 with commit 7ba1ba12eeef and fixed in 6.10.3 with commit ebc0e91ba76d
	Issue introduced in 2.6.27 with commit 7ba1ba12eeef and fixed in 6.11-rc1 with commit 899ee2c3829c

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2024-43854

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
block/bio-integrity.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/d418313bd8f55c079a7da12651951b489a638ac1
	https://git.kernel.org/stable/c/23a19655fb56f241e592041156dfb1c6d04da644
	https://git.kernel.org/stable/c/ebc0e91ba76dc6544fff9f5b66408b1982806a00
	https://git.kernel.org/stable/c/899ee2c3829c5ac14bfc7d3c4a5846c0b709b78f