Fix CVE-2026-71225

Fix IV reuse in libkcapi one-shot symmetric cipher chunking

Resolves: RHEL-224704

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
This commit is contained in:
Zoltan Fridrich 2026-08-18 12:20:06 +02:00
parent 351138c3d0
commit 50d911a3e7
2 changed files with 23 additions and 0 deletions

20
009-CVE-2026-71225.patch Normal file
View File

@ -0,0 +1,20 @@
diff --git a/lib/kcapi-kernel-if.c b/lib/kcapi-kernel-if.c
index a54cdaa..859ecdf 100644
--- a/lib/kcapi-kernel-if.c
+++ b/lib/kcapi-kernel-if.c
@@ -1387,6 +1387,15 @@ ssize_t _kcapi_cipher_crypt_chunk(struct kcapi_handle *handle,
inlen -= inprocess;
out += ret;
outlen -= (uint32_t)ret;
+
+ /*
+ * Clear the IV so subsequent chunks do not override the
+ * kernel's chained IV via ALG_SET_IV. The kernel updates
+ * its internal IV after each operation; by not sending
+ * ALG_SET_IV for later chunks, the next chunk continues
+ * where the previous one left off.
+ */
+ handle->cipher.iv = NULL;
}
return totallen;

View File

@ -141,6 +141,7 @@ Patch5: 005-fips-mode-tests.patch
Patch6: 006-aead-tag-verification.patch
Patch7: 007-CVE-2026-71226.patch
Patch8: 008-CVE-2026-71227.patch
Patch9: 009-CVE-2026-71225.patch
BuildRequires: bash
BuildRequires: coreutils
@ -534,6 +535,8 @@ popd
- CVE-2026-71227: Fix infinite loop denial of service in libkcapi
_kcapi_aio_read_all() due to unhandled io_getevents() timeout return
Resolves: RHEL-224976
- CVE-2026-71225: Fix IV reuse in libkcapi one-shot symmetric cipher chunking
Resolves: RHEL-224704
* Fri Dec 01 2023 Zoltan Fridrich <zfridric@redhat.com> - 1.4.0-2
- Backport fixes for kcapi-hasher target option