new file mode 100644
@@ -0,0 +1,45 @@
+From 1d44554a1bb262db63ff4e240152a9deecd99054 Mon Sep 17 00:00:00 2001
+From: Biniam F Demissie <biniamfd@gmail.com>
+Date: Mon, 6 Jul 2026 04:33:45 +0100
+Subject: [PATCH] cbor: overflow
+
+CVE: CVE-2026-78161
+Upstream-Status: Backport [https://github.com/warmcat/libwebsockets/commit/1d44554a1bb262db63ff4e240152a9deecd99054]
+Signed-off-by: Peter Marko <peter.marko@siemens.com>
+---
+ lib/misc/lecp.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/lib/misc/lecp.c b/lib/misc/lecp.c
+index 44a7ac667..13e6ba476 100644
+--- a/lib/misc/lecp.c
++++ b/lib/misc/lecp.c
+@@ -325,11 +325,11 @@ report_raw_cbor(struct lecp_ctx *ctx)
+ if (!ctx->cbor_pos)
+ return 0;
+
++ ctx->cbor_pos = 0; /* reset BEFORE callback */
++
+ if (pst->cb(ctx, LECPCB_LITERAL_CBOR))
+ return 1;
+
+- ctx->cbor_pos = 0;
+-
+ return 0;
+ }
+
+@@ -388,10 +388,11 @@ lecp_parse(struct lecp_ctx *ctx, const uint8_t *cbor, size_t len)
+ */
+
+ if (ctx->literal_cbor_report) {
++ if (ctx->cbor_pos >= sizeof(ctx->cbor)) {
++ if (report_raw_cbor(ctx))
++ goto reject_callback;
++ }
+ ctx->cbor[ctx->cbor_pos++] = c;
+- if (ctx->cbor_pos == sizeof(ctx->cbor) &&
+- report_raw_cbor(ctx))
+- goto reject_callback;
+ }
+
+ switch (st->s) {
@@ -11,6 +11,7 @@ SRC_URI = " \
git://github.com/warmcat/libwebsockets.git;protocol=https;branch=v4.5-stable;tag=v${PV} \
file://CVE-2026-10650.patch \
file://CVE-2026-19773.patch \
+ file://CVE-2026-78161.patch \
"
UPSTREAM_CHECK_URI = "https://github.com/warmcat/${BPN}/releases"