Skip to contentSkip to conversation

CVE-2024-26763: dm-crypt: don't modify the data when using authenticated encryption

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Apr 3, 2024

lore
Share & tools
lore
#0 lore raw

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

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

dm-crypt: don't modify the data when using authenticated encryption

It was said that authenticated encryption could produce invalid tag when the data that is being encrypted is modified [1]. So, fix this problem by copying the data into the clone bio first and then encrypt them inside the clone bio.

This may reduce performance, but it is needed to prevent the user from corrupting the device by writing data with O_DIRECT and modifying them at the same time.

[1] https://lore.kernel.org/all/[email protected]/T/

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

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

	Fixed in 4.19.308 with commit 43a202bd5529
	Fixed in 5.4.270 with commit 0dccbb93538f
	Fixed in 5.10.211 with commit 3c652f6fa1e1
	Fixed in 5.15.150 with commit 1a4371db68a3
	Fixed in 6.1.80 with commit e08c2a8d27e9
	Fixed in 6.6.19 with commit 64ba01a36598
	Fixed in 6.7.7 with commit d9e3763a505e
	Fixed in 6.8 with commit 50c70240097c

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-26763

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:
drivers/md/dm-crypt.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/43a202bd552976497474ae144942e32cc5f34d7e
	https://git.kernel.org/stable/c/0dccbb93538fe89a86c6de31d4b1c8c560848eaa
	https://git.kernel.org/stable/c/3c652f6fa1e1f9f02c3fbf359d260ad153ec5f90
	https://git.kernel.org/stable/c/1a4371db68a31076afbe56ecce34fbbe6c80c529
	https://git.kernel.org/stable/c/e08c2a8d27e989f0f5b0888792643027d7e691e6
	https://git.kernel.org/stable/c/64ba01a365980755732972523600a961c4266b75
	https://git.kernel.org/stable/c/d9e3763a505e50ba3bd22846f2a8db99429fb857
	https://git.kernel.org/stable/c/50c70240097ce41fe6bce6478b80478281e4d0f7