title: dm-crypt: don't modify the data when using authenticated encryption
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/20240207004723.GA35324@sol.localdomain/T/
affected:
{
product: Linux
vendor: Linux
defaultStatus: unaffected
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
versions:
version: 1da177e4c3f4, lessThan: 43a202bd5529, status: affected, versionType: git
version: 1da177e4c3f4, lessThan: 0dccbb93538f, status: affected, versionType: git
version: 1da177e4c3f4, lessThan: 3c652f6fa1e1, status: affected, versionType: git
version: 1da177e4c3f4, lessThan: 1a4371db68a3, status: affected, versionType: git
version: 1da177e4c3f4, lessThan: e08c2a8d27e9, status: affected, versionType: git
version: 1da177e4c3f4, lessThan: 64ba01a36598, status: affected, versionType: git
version: 1da177e4c3f4, lessThan: d9e3763a505e, status: affected, versionType: git
version: 1da177e4c3f4, lessThan: 50c70240097c, status: affected, versionType: git
}
{
product: Linux
vendor: Linux
defaultStatus: affected
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
versions:
version: 4.19.308, lessThanOrEqual: 4.19.*, status: unaffected, versionType: custom
version: 5.4.270, lessThanOrEqual: 5.4.*, status: unaffected, versionType: custom
version: 5.10.211, lessThanOrEqual: 5.10.*, status: unaffected, versionType: custom
version: 5.15.150, lessThanOrEqual: 5.15.*, status: unaffected, versionType: custom
version: 6.1.80, lessThanOrEqual: 6.1.*, status: unaffected, versionType: custom
version: 6.6.19, lessThanOrEqual: 6.6.*, status: unaffected, versionType: custom
version: 6.7.7, lessThanOrEqual: 6.7.*, status: unaffected, versionType: custom
version: 6.8, lessThanOrEqual: *, status: unaffected, versionType: original_commit_for_fix
}
