new file mode 100644
@@ -0,0 +1,40 @@
+From d85279e3bec7578f8c238aec92539985c2032616 Mon Sep 17 00:00:00 2001
+From: Stephan Mueller <smueller@chronox.de>
+Date: Thu, 30 Jul 2026 08:38:10 +0200
+Subject: [PATCH] Fix potential infinite loop
+
+Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
+Signed-off-by: Stephan Mueller <smueller@chronox.de>
+
+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 <ankur.tyagi85@gmail.com>
+---
+ 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;
+ }
+
@@ -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