diff options
3 files changed, 141 insertions, 0 deletions
diff --git a/meta-webserver/recipes-httpd/nginx/nginx-1.24.0/CVE-2026-27784.patch b/meta-webserver/recipes-httpd/nginx/nginx-1.24.0/CVE-2026-27784.patch new file mode 100644 index 0000000000..41a8563c67 --- /dev/null +++ b/meta-webserver/recipes-httpd/nginx/nginx-1.24.0/CVE-2026-27784.patch | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | From b23ac73b00313d159a99636c21ef71b828781018 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Roman Arutyunyan <arut@nginx.com> | ||
| 3 | Date: Mon, 2 Mar 2026 21:12:34 +0400 | ||
| 4 | Subject: [PATCH] Mp4: fixed possible integer overflow on 32-bit platforms. | ||
| 5 | |||
| 6 | Previously, a 32-bit overflow could happen while validating atom entries | ||
| 7 | count. This allowed processing of an invalid atom with entrires beyond | ||
| 8 | its boundaries with reads and writes outside of the allocated mp4 buffer. | ||
| 9 | |||
| 10 | Reported by Prabhav Srinath (sprabhav7). | ||
| 11 | |||
| 12 | CVE: CVE-2026-27784 | ||
| 13 | Upstream-Status: Backport [https://github.com/nginx/nginx/commit/b23ac73b00313d159a99636c21ef71b828781018] | ||
| 14 | Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> | ||
| 15 | --- | ||
| 16 | src/http/modules/ngx_http_mp4_module.c | 14 +++++++------- | ||
| 17 | 1 file changed, 7 insertions(+), 7 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/src/http/modules/ngx_http_mp4_module.c b/src/http/modules/ngx_http_mp4_module.c | ||
| 20 | index 041ad26..a7f8be7 100644 | ||
| 21 | --- a/src/http/modules/ngx_http_mp4_module.c | ||
| 22 | +++ b/src/http/modules/ngx_http_mp4_module.c | ||
| 23 | @@ -2294,7 +2294,7 @@ ngx_http_mp4_read_stts_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size) | ||
| 24 | "mp4 time-to-sample entries:%uD", entries); | ||
| 25 | |||
| 26 | if (ngx_mp4_atom_data_size(ngx_mp4_stts_atom_t) | ||
| 27 | - + entries * sizeof(ngx_mp4_stts_entry_t) > atom_data_size) | ||
| 28 | + + (uint64_t) entries * sizeof(ngx_mp4_stts_entry_t) > atom_data_size) | ||
| 29 | { | ||
| 30 | ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0, | ||
| 31 | "\"%s\" mp4 stts atom too small", mp4->file.name.data); | ||
| 32 | @@ -2597,7 +2597,7 @@ ngx_http_mp4_read_stss_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size) | ||
| 33 | atom->last = atom_table; | ||
| 34 | |||
| 35 | if (ngx_mp4_atom_data_size(ngx_http_mp4_stss_atom_t) | ||
| 36 | - + entries * sizeof(uint32_t) > atom_data_size) | ||
| 37 | + + (uint64_t) entries * sizeof(uint32_t) > atom_data_size) | ||
| 38 | { | ||
| 39 | ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0, | ||
| 40 | "\"%s\" mp4 stss atom too small", mp4->file.name.data); | ||
| 41 | @@ -2802,7 +2802,7 @@ ngx_http_mp4_read_ctts_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size) | ||
| 42 | atom->last = atom_table; | ||
| 43 | |||
| 44 | if (ngx_mp4_atom_data_size(ngx_mp4_ctts_atom_t) | ||
| 45 | - + entries * sizeof(ngx_mp4_ctts_entry_t) > atom_data_size) | ||
| 46 | + + (uint64_t) entries * sizeof(ngx_mp4_ctts_entry_t) > atom_data_size) | ||
| 47 | { | ||
| 48 | ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0, | ||
| 49 | "\"%s\" mp4 ctts atom too small", mp4->file.name.data); | ||
| 50 | @@ -2984,7 +2984,7 @@ ngx_http_mp4_read_stsc_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size) | ||
| 51 | "sample-to-chunk entries:%uD", entries); | ||
| 52 | |||
| 53 | if (ngx_mp4_atom_data_size(ngx_mp4_stsc_atom_t) | ||
| 54 | - + entries * sizeof(ngx_mp4_stsc_entry_t) > atom_data_size) | ||
| 55 | + + (uint64_t) entries * sizeof(ngx_mp4_stsc_entry_t) > atom_data_size) | ||
| 56 | { | ||
| 57 | ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0, | ||
| 58 | "\"%s\" mp4 stsc atom too small", mp4->file.name.data); | ||
| 59 | @@ -3362,7 +3362,7 @@ ngx_http_mp4_read_stsz_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size) | ||
| 60 | |||
| 61 | if (size == 0) { | ||
| 62 | if (ngx_mp4_atom_data_size(ngx_mp4_stsz_atom_t) | ||
| 63 | - + entries * sizeof(uint32_t) > atom_data_size) | ||
| 64 | + + (uint64_t) entries * sizeof(uint32_t) > atom_data_size) | ||
| 65 | { | ||
| 66 | ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0, | ||
| 67 | "\"%s\" mp4 stsz atom too small", | ||
| 68 | @@ -3521,7 +3521,7 @@ ngx_http_mp4_read_stco_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size) | ||
| 69 | ngx_log_debug1(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0, "chunks:%uD", entries); | ||
| 70 | |||
| 71 | if (ngx_mp4_atom_data_size(ngx_mp4_stco_atom_t) | ||
| 72 | - + entries * sizeof(uint32_t) > atom_data_size) | ||
| 73 | + + (uint64_t) entries * sizeof(uint32_t) > atom_data_size) | ||
| 74 | { | ||
| 75 | ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0, | ||
| 76 | "\"%s\" mp4 stco atom too small", mp4->file.name.data); | ||
| 77 | @@ -3737,7 +3737,7 @@ ngx_http_mp4_read_co64_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size) | ||
| 78 | ngx_log_debug1(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0, "chunks:%uD", entries); | ||
| 79 | |||
| 80 | if (ngx_mp4_atom_data_size(ngx_mp4_co64_atom_t) | ||
| 81 | - + entries * sizeof(uint64_t) > atom_data_size) | ||
| 82 | + + (uint64_t) entries * sizeof(uint64_t) > atom_data_size) | ||
| 83 | { | ||
| 84 | ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0, | ||
| 85 | "\"%s\" mp4 co64 atom too small", mp4->file.name.data); | ||
| 86 | -- | ||
| 87 | 2.50.1 | ||
| 88 | |||
diff --git a/meta-webserver/recipes-httpd/nginx/nginx-1.24.0/CVE-2026-28755.patch b/meta-webserver/recipes-httpd/nginx/nginx-1.24.0/CVE-2026-28755.patch new file mode 100644 index 0000000000..37e6d5b3b4 --- /dev/null +++ b/meta-webserver/recipes-httpd/nginx/nginx-1.24.0/CVE-2026-28755.patch | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | From 78f581487706f2e43eea5a060c516fc4d98090e8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Sergey Kandaurov <pluknet@nginx.com> | ||
| 3 | Date: Tue, 17 Mar 2026 19:20:03 +0400 | ||
| 4 | Subject: [PATCH] Stream: fixed client certificate validation with OCSP. | ||
| 5 | |||
| 6 | Check for OCSP status was missed in 581cf2267, resulting | ||
| 7 | in a broken validation. | ||
| 8 | |||
| 9 | Reported by Mufeed VH of Winfunc Research. | ||
| 10 | |||
| 11 | CVE: CVE-2026-28755 | ||
| 12 | Upstream-Status: Backport [https://github.com/nginx/nginx/commit/78f581487706f2e43eea5a060c516fc4d98090e8] | ||
| 13 | Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> | ||
| 14 | --- | ||
| 15 | src/stream/ngx_stream_ssl_module.c | 10 ++++++++++ | ||
| 16 | 1 file changed, 10 insertions(+) | ||
| 17 | |||
| 18 | diff --git a/src/stream/ngx_stream_ssl_module.c b/src/stream/ngx_stream_ssl_module.c | ||
| 19 | index 1ba1825..c8e8323 100644 | ||
| 20 | --- a/src/stream/ngx_stream_ssl_module.c | ||
| 21 | +++ b/src/stream/ngx_stream_ssl_module.c | ||
| 22 | @@ -335,6 +335,7 @@ ngx_stream_ssl_handler(ngx_stream_session_t *s) | ||
| 23 | long rc; | ||
| 24 | X509 *cert; | ||
| 25 | ngx_int_t rv; | ||
| 26 | + const char *str; | ||
| 27 | ngx_connection_t *c; | ||
| 28 | ngx_stream_ssl_conf_t *sslcf; | ||
| 29 | |||
| 30 | @@ -385,6 +386,15 @@ ngx_stream_ssl_handler(ngx_stream_session_t *s) | ||
| 31 | |||
| 32 | X509_free(cert); | ||
| 33 | } | ||
| 34 | + | ||
| 35 | + if (ngx_ssl_ocsp_get_status(c, &str) != NGX_OK) { | ||
| 36 | + ngx_log_error(NGX_LOG_INFO, c->log, 0, | ||
| 37 | + "client SSL certificate verify error: %s", str); | ||
| 38 | + | ||
| 39 | + ngx_ssl_remove_cached_session(c->ssl->session_ctx, | ||
| 40 | + (SSL_get0_session(c->ssl->connection))); | ||
| 41 | + return NGX_ERROR; | ||
| 42 | + } | ||
| 43 | } | ||
| 44 | |||
| 45 | return NGX_OK; | ||
| 46 | -- | ||
| 47 | 2.50.1 | ||
| 48 | |||
diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.24.0.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.24.0.bb index 2e865e400e..c843b67975 100644 --- a/meta-webserver/recipes-httpd/nginx/nginx_1.24.0.bb +++ b/meta-webserver/recipes-httpd/nginx/nginx_1.24.0.bb | |||
| @@ -2,5 +2,10 @@ require nginx.inc | |||
| 2 | 2 | ||
| 3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=175abb631c799f54573dc481454c8632" | 3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=175abb631c799f54573dc481454c8632" |
| 4 | 4 | ||
| 5 | SRC_URI:append = " \ | ||
| 6 | file://CVE-2026-27784.patch \ | ||
| 7 | file://CVE-2026-28755.patch \ | ||
| 8 | " | ||
| 9 | |||
| 5 | SRC_URI[sha256sum] = "77a2541637b92a621e3ee76776c8b7b40cf6d707e69ba53a940283e30ff2f55d" | 10 | SRC_URI[sha256sum] = "77a2541637b92a621e3ee76776c8b7b40cf6d707e69ba53a940283e30ff2f55d" |
| 6 | 11 | ||
