libwebsockets: patch CVE-2026-78161

Pick patch per [1].

[1] https://security-tracker.debian.org/tracker/CVE-2026-78161

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
This commit is contained in:
Peter Marko authored and Anuj Mittal committed 2026-10-27 13:38:01 +05:30
1 parent 552db40603
commit facdbc6acc
2 files changed
+46

No files matched your search

@@ -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"