diff --git a/meta-oe/recipes-crypto/libkcapi/libkcapi/CVE-2026-71227.patch b/meta-oe/recipes-crypto/libkcapi/libkcapi/CVE-2026-71227.patch new file mode 100644 index 0000000000..6074c0da27 --- /dev/null +++ b/meta-oe/recipes-crypto/libkcapi/libkcapi/CVE-2026-71227.patch @@ -0,0 +1,40 @@ +From d85279e3bec7578f8c238aec92539985c2032616 Mon Sep 17 00:00:00 2001 +From: Stephan Mueller +Date: Thu, 30 Jul 2026 08:38:10 +0200 +Subject: [PATCH] Fix potential infinite loop + +Signed-off-by: Zoltan Fridrich +Signed-off-by: Stephan Mueller + +CVE: CVE-2026-71227 +Upstream-Status: Backport [https://github.com/smuellerDD/libkcapi/commit/9a29cc2ce0fa87ec212d58118402eafe07db3f60] + +Dropped changes to the CHANGES.md file. + +Signed-off-by: Ankur Tyagi +--- + lib/kcapi-kernel-if.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +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/meta-oe/recipes-crypto/libkcapi/libkcapi_1.5.0.bb b/meta-oe/recipes-crypto/libkcapi/libkcapi_1.5.0.bb index f2ddc25336..f1fe6a0940 100644 --- a/meta-oe/recipes-crypto/libkcapi/libkcapi_1.5.0.bb +++ b/meta-oe/recipes-crypto/libkcapi/libkcapi_1.5.0.bb @@ -8,6 +8,7 @@ SRC_URI = "git://github.com/smuellerDD/libkcapi.git;branch=master;protocol=https file://CVE-2026-71226-1.patch \ file://CVE-2026-71226-2.patch \ file://CVE-2026-71226-3.patch \ + file://CVE-2026-71227.patch \ " inherit autotools