diff --git a/008-CVE-2026-71227.patch b/008-CVE-2026-71227.patch new file mode 100644 index 0000000..a6b5d7e --- /dev/null +++ b/008-CVE-2026-71227.patch @@ -0,0 +1,22 @@ +diff --git a/lib/kcapi-kernel-if.c b/lib/kcapi-kernel-if.c +index 8a12c09..a54cdaa 100644 +--- a/lib/kcapi-kernel-if.c ++++ b/lib/kcapi-kernel-if.c +@@ -436,6 +436,8 @@ int _kcapi_aio_read_all(struct kcapi_handle *handle, size_t toread, + + if (rc < 0) + return err == 0 ? rc : err; ++ if (rc == 0) ++ return err == 0 ? -ETIMEDOUT : err; + + for (i = 0; i < rc; i++) { + struct iocb *cb; +@@ -509,7 +511,7 @@ int _kcapi_aio_read_iov(struct kcapi_handle *handle, + timeout.tv_sec = 0; + timeout.tv_nsec = 10000; + ret = _kcapi_aio_read_all(handle, iovlen, &timeout); +- if (ret < 0) ++ if (ret < 0 && ret != -ETIMEDOUT) + return ret; + } + diff --git a/libkcapi.spec b/libkcapi.spec index c94d314..f62991a 100644 --- a/libkcapi.spec +++ b/libkcapi.spec @@ -140,6 +140,7 @@ Patch4: 004-hasher-target-option.patch Patch5: 005-fips-mode-tests.patch Patch6: 006-aead-tag-verification.patch Patch7: 007-CVE-2026-71226.patch +Patch8: 008-CVE-2026-71227.patch BuildRequires: bash BuildRequires: coreutils @@ -530,6 +531,9 @@ popd - CVE-2026-71226: Fix memory corruption via uncanceled AIO requests on error in libkcapi's one-shot AIO path Resolves: RHEL-224815 +- 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 * Fri Dec 01 2023 Zoltan Fridrich - 1.4.0-2 - Backport fixes for kcapi-hasher target option