From b8399ae07ae1958eced847a3d5e8a4227c2e3aa2 Mon Sep 17 00:00:00 2001 From: Ankur Tyagi Date: Wed, 23 Sep 2026 22:40:30 +1200 Subject: [PATCH] libwebsockets: patch CVE-2026-19773 Details: https://nvd.nist.gov/vuln/detail/cve-2026-19773 Signed-off-by: Ankur Tyagi Signed-off-by: Anuj Mittal --- .../libwebsockets/CVE-2026-19773.patch | 31 +++++++++++++++++++ .../libwebsockets/libwebsockets_4.5.8.bb | 1 + 2 files changed, 32 insertions(+) create mode 100644 meta-oe/recipes-connectivity/libwebsockets/libwebsockets/CVE-2026-19773.patch diff --git a/meta-oe/recipes-connectivity/libwebsockets/libwebsockets/CVE-2026-19773.patch b/meta-oe/recipes-connectivity/libwebsockets/libwebsockets/CVE-2026-19773.patch new file mode 100644 index 0000000000..74908c5437 --- /dev/null +++ b/meta-oe/recipes-connectivity/libwebsockets/libwebsockets/CVE-2026-19773.patch @@ -0,0 +1,31 @@ +From 998a9af40aa6c2ddcb91c662d6585ea80ab52f85 Mon Sep 17 00:00:00 2001 +From: Andy Green +Date: Fri, 3 Jul 2026 18:43:25 +0100 +Subject: [PATCH] zdi-can-31036: h2 bounds check on server + +This vulnerability was discovered by: +Maher Azzouzi working with TrendAI Zero Day Initiative + +(cherry picked from commit 824151862f37bc72f46d9a3e01d5b9408d313a0b) + +CVE: CVE-2026-19773 +Upstream-Status: Backport [https://github.com/warmcat/libwebsockets/commit/824151862f37bc72f46d9a3e01d5b9408d313a0b] +Signed-off-by: Ankur Tyagi +--- + lib/roles/h2/hpack.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/lib/roles/h2/hpack.c b/lib/roles/h2/hpack.c +index 1025faa6f..863eb88c9 100644 +--- a/lib/roles/h2/hpack.c ++++ b/lib/roles/h2/hpack.c +@@ -274,6 +274,9 @@ static int lws_frag_append(struct lws *wsi, unsigned char c) + { + struct allocated_headers *ah = wsi->http.ah; + ++ if ((unsigned int)ah->pos >= wsi->a.context->max_http_header_data) ++ return 1; ++ + ah->data[ah->pos++] = (char)c; + ah->frags[ah->nfrag].len++; + diff --git a/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.5.8.bb b/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.5.8.bb index bca2663419..6a3d0b4033 100644 --- a/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.5.8.bb +++ b/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.5.8.bb @@ -10,6 +10,7 @@ SRCREV = "fbb0baf6af9c4324f0f1591734c78b0089b599d4" 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 \ " UPSTREAM_CHECK_URI = "https://github.com/warmcat/${BPN}/releases"