diff options
| author | Anil Dongare <adongare@cisco.com> | 2026-04-03 00:14:56 -0700 |
|---|---|---|
| committer | Paul Barker <paul@pbarker.dev> | 2026-05-04 13:57:31 +0100 |
| commit | 466061454430874fec26be784a9360476727deb6 (patch) | |
| tree | e3ca61688d5ca5d02c5f7585ddda549b333d243f | |
| parent | 8e82d7a9bfb059e8fc9db70f80348d1ca0433d3c (diff) | |
| download | poky-466061454430874fec26be784a9360476727deb6.tar.gz | |
nghttp2: Fix CVE-2026-27135
Pick patch from [1] also mentioned in [2]
[1] https://github.com/nghttp2/nghttp2/commit/5c7df8fa815ac1004d9ecb9d1f7595c4d37f46e1
[2] https://nvd.nist.gov/vuln/detail/CVE-2026-27135
(From OE-Core rev: 892fdc819660ab67d9930e0ccb71e4138fcf1750)
Signed-off-by: Anil Dongare <adongare@cisco.com>
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Paul Barker <paul@pbarker.dev>
| -rw-r--r-- | meta/recipes-support/nghttp2/nghttp2/CVE-2026-27135.patch | 110 | ||||
| -rw-r--r-- | meta/recipes-support/nghttp2/nghttp2_1.61.0.bb | 4 |
2 files changed, 113 insertions, 1 deletions
diff --git a/meta/recipes-support/nghttp2/nghttp2/CVE-2026-27135.patch b/meta/recipes-support/nghttp2/nghttp2/CVE-2026-27135.patch new file mode 100644 index 0000000000..c4977cded0 --- /dev/null +++ b/meta/recipes-support/nghttp2/nghttp2/CVE-2026-27135.patch | |||
| @@ -0,0 +1,110 @@ | |||
| 1 | From f9812d447b14435de77751077ef48214ebf252ec Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | ||
| 3 | Date: Wed, 18 Feb 2026 18:04:30 +0900 | ||
| 4 | Subject: [PATCH] Fix missing iframe->state validations to avoid assertion | ||
| 5 | failure | ||
| 6 | |||
| 7 | CVE: CVE-2026-27135 | ||
| 8 | Upstream-Status: Backport [https://github.com/nghttp2/nghttp2/commit/5c7df8fa815ac1004d9ecb9d1f7595c4d37f46e1] | ||
| 9 | |||
| 10 | (cherry picked from commit 5c7df8fa815ac1004d9ecb9d1f7595c4d37f46e1) | ||
| 11 | Signed-off-by: Anil Dongare <adongare@cisco.com> | ||
| 12 | --- | ||
| 13 | lib/nghttp2_session.c | 32 ++++++++++++++++++++++++++++++++ | ||
| 14 | 1 file changed, 32 insertions(+) | ||
| 15 | |||
| 16 | diff --git a/lib/nghttp2_session.c b/lib/nghttp2_session.c | ||
| 17 | index 004a4dff..54312588 100644 | ||
| 18 | --- a/lib/nghttp2_session.c | ||
| 19 | +++ b/lib/nghttp2_session.c | ||
| 20 | @@ -6079,6 +6079,10 @@ nghttp2_ssize nghttp2_session_mem_recv2(nghttp2_session *session, | ||
| 21 | return rv; | ||
| 22 | } | ||
| 23 | |||
| 24 | + if (iframe->state == NGHTTP2_IB_IGN_ALL) { | ||
| 25 | + return (nghttp2_ssize)inlen; | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | on_begin_frame_called = 1; | ||
| 29 | |||
| 30 | rv = session_process_headers_frame(session); | ||
| 31 | @@ -6445,6 +6449,9 @@ nghttp2_ssize nghttp2_session_mem_recv2(nghttp2_session *session, | ||
| 32 | if (nghttp2_is_fatal(rv)) { | ||
| 33 | return rv; | ||
| 34 | } | ||
| 35 | + if (iframe->state == NGHTTP2_IB_IGN_ALL) { | ||
| 36 | + return (nghttp2_ssize)inlen; | ||
| 37 | + } | ||
| 38 | } | ||
| 39 | } | ||
| 40 | |||
| 41 | @@ -6701,6 +6708,10 @@ nghttp2_ssize nghttp2_session_mem_recv2(nghttp2_session *session, | ||
| 42 | return rv; | ||
| 43 | } | ||
| 44 | |||
| 45 | + if (iframe->state == NGHTTP2_IB_IGN_ALL) { | ||
| 46 | + return (nghttp2_ssize)inlen; | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | session_inbound_frame_reset(session); | ||
| 50 | |||
| 51 | break; | ||
| 52 | @@ -7004,6 +7015,10 @@ nghttp2_ssize nghttp2_session_mem_recv2(nghttp2_session *session, | ||
| 53 | if (nghttp2_is_fatal(rv)) { | ||
| 54 | return rv; | ||
| 55 | } | ||
| 56 | + | ||
| 57 | + if (iframe->state == NGHTTP2_IB_IGN_ALL) { | ||
| 58 | + return (nghttp2_ssize)inlen; | ||
| 59 | + } | ||
| 60 | } else { | ||
| 61 | iframe->state = NGHTTP2_IB_IGN_HEADER_BLOCK; | ||
| 62 | } | ||
| 63 | @@ -7169,6 +7184,11 @@ nghttp2_ssize nghttp2_session_mem_recv2(nghttp2_session *session, | ||
| 64 | rv = session->callbacks.on_data_chunk_recv_callback( | ||
| 65 | session, iframe->frame.hd.flags, iframe->frame.hd.stream_id, | ||
| 66 | in - readlen, (size_t)data_readlen, session->user_data); | ||
| 67 | + | ||
| 68 | + if (iframe->state == NGHTTP2_IB_IGN_ALL) { | ||
| 69 | + return (nghttp2_ssize)inlen; | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | if (rv == NGHTTP2_ERR_PAUSE) { | ||
| 73 | return (nghttp2_ssize)(in - first); | ||
| 74 | } | ||
| 75 | @@ -7256,6 +7276,10 @@ nghttp2_ssize nghttp2_session_mem_recv2(nghttp2_session *session, | ||
| 76 | return rv; | ||
| 77 | } | ||
| 78 | |||
| 79 | + if (iframe->state == NGHTTP2_IB_IGN_ALL) { | ||
| 80 | + return (nghttp2_ssize)inlen; | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | if (rv != 0) { | ||
| 84 | busy = 1; | ||
| 85 | |||
| 86 | @@ -7274,6 +7298,10 @@ nghttp2_ssize nghttp2_session_mem_recv2(nghttp2_session *session, | ||
| 87 | return rv; | ||
| 88 | } | ||
| 89 | |||
| 90 | + if (iframe->state == NGHTTP2_IB_IGN_ALL) { | ||
| 91 | + return (nghttp2_ssize)inlen; | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | session_inbound_frame_reset(session); | ||
| 95 | |||
| 96 | break; | ||
| 97 | @@ -7302,6 +7330,10 @@ nghttp2_ssize nghttp2_session_mem_recv2(nghttp2_session *session, | ||
| 98 | return rv; | ||
| 99 | } | ||
| 100 | |||
| 101 | + if (iframe->state == NGHTTP2_IB_IGN_ALL) { | ||
| 102 | + return (nghttp2_ssize)inlen; | ||
| 103 | + } | ||
| 104 | + | ||
| 105 | session_inbound_frame_reset(session); | ||
| 106 | |||
| 107 | break; | ||
| 108 | -- | ||
| 109 | 2.43.7 | ||
| 110 | |||
diff --git a/meta/recipes-support/nghttp2/nghttp2_1.61.0.bb b/meta/recipes-support/nghttp2/nghttp2_1.61.0.bb index ad85576dcb..ebba15db28 100644 --- a/meta/recipes-support/nghttp2/nghttp2_1.61.0.bb +++ b/meta/recipes-support/nghttp2/nghttp2_1.61.0.bb | |||
| @@ -4,7 +4,9 @@ SECTION = "libs" | |||
| 4 | LICENSE = "MIT" | 4 | LICENSE = "MIT" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=764abdf30b2eadd37ce47dcbce0ea1ec" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=764abdf30b2eadd37ce47dcbce0ea1ec" |
| 6 | 6 | ||
| 7 | SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/nghttp2-${PV}.tar.xz" | 7 | SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/nghttp2-${PV}.tar.xz \ |
| 8 | file://CVE-2026-27135.patch \ | ||
| 9 | " | ||
| 8 | SRC_URI[sha256sum] = "c0e660175b9dc429f11d25b9507a834fb752eea9135ab420bb7cb7e9dbcc9654" | 10 | SRC_URI[sha256sum] = "c0e660175b9dc429f11d25b9507a834fb752eea9135ab420bb7cb7e9dbcc9654" |
| 9 | 11 | ||
| 10 | inherit cmake manpages python3native github-releases | 12 | inherit cmake manpages python3native github-releases |
