From 214580d479a6ed6f923f6b985b97aa88bad59438 Mon Sep 17 00:00:00 2001
From: Christos Trochalakis
Date: Thu, 27 Dec 2018 14:44:09 +0200
Subject: [PATCH 001/329] Add missing changelog entries
Those were forgotten during the upload, but let's add them
for completeness.
---
debian/changelog | 2 ++
1 file changed, 2 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index be5df64..93a36f2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ nginx (1.14.2-2) unstable; urgency=medium
[ Christos Trochalakis ]
* http-dav-ext: Upgrade to 3.0.0 (Closes: #851651)
+ * Use a minimal export of the upstream signing key
+ * Bump Standards-Version, no changes needed
-- Christos Trochalakis Thu, 27 Dec 2018 12:49:34 +0200
From e3f6ed2d6547bf910fe5e6a21ea660ea83b0e7b7 Mon Sep 17 00:00:00 2001
From: Christos Trochalakis
Date: Thu, 27 Dec 2018 14:44:09 +0200
Subject: [PATCH 002/329] Add missing changelog entries
Those were forgotten during the upload, but let's add them
for completeness.
Gbp-Dch: Ignore
---
debian/changelog | 2 ++
1 file changed, 2 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index be5df64..93a36f2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ nginx (1.14.2-2) unstable; urgency=medium
[ Christos Trochalakis ]
* http-dav-ext: Upgrade to 3.0.0 (Closes: #851651)
+ * Use a minimal export of the upstream signing key
+ * Bump Standards-Version, no changes needed
-- Christos Trochalakis Thu, 27 Dec 2018 12:49:34 +0200
From ccedd1185b2471d7b50d5617b5383fb021001888 Mon Sep 17 00:00:00 2001
From: Christos Trochalakis
Date: Tue, 13 Aug 2019 21:04:39 +0300
Subject: [PATCH 003/329] gbp: setup for buster
Gbp-Dch: Ignore
---
debian/gbp.conf | 2 ++
1 file changed, 2 insertions(+)
diff --git a/debian/gbp.conf b/debian/gbp.conf
index a14a699..b5fb2c9 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -2,3 +2,5 @@
pristine-tar = True
upstream-branch = upstream
upstream-tag = upstream/%(version)s
+dist=buster
+debian-branch=buster
From d2bacdb1cf1068437e9ac89e334c4fe130f0107c Mon Sep 17 00:00:00 2001
From: Christos Trochalakis
Date: Mon, 19 Aug 2019 11:33:14 +0300
Subject: [PATCH 004/329] Handle CVE-2019-9511 CVE-2019-9513 CVE-2019-9516
Several security issues were identified in nginx HTTP/2
implementation, which might cause excessive memory consumption
and CPU usage (CVE-2019-9511, CVE-2019-9513, CVE-2019-9516).
The issues affect nginx compiled with the ngx_http_v2_module (not
compiled by default) if the "http2" option of the "listen" directive
is used in a configuration file.
The issues affect nginx 1.9.5 - 1.17.2.
The issues are fixed in nginx 1.17.3, 1.16.1.
Thanks to Jonathan Looney from Netflix for discovering these issues.
---
debian/patches/CVE-2019-9511.patch | 87 ++++++++++++++++++++++++++++++
debian/patches/CVE-2019-9513.patch | 62 +++++++++++++++++++++
debian/patches/CVE-2019-9516.patch | 45 ++++++++++++++++
debian/patches/series | 3 ++
4 files changed, 197 insertions(+)
create mode 100644 debian/patches/CVE-2019-9511.patch
create mode 100644 debian/patches/CVE-2019-9513.patch
create mode 100644 debian/patches/CVE-2019-9516.patch
diff --git a/debian/patches/CVE-2019-9511.patch b/debian/patches/CVE-2019-9511.patch
new file mode 100644
index 0000000..3b48e0c
--- /dev/null
+++ b/debian/patches/CVE-2019-9511.patch
@@ -0,0 +1,87 @@
+From 3f64486e0c15414dc6368139453dcaca338ddf3e Mon Sep 17 00:00:00 2001
+From: Ruslan Ermilov
+Date: Tue, 13 Aug 2019 15:43:36 +0300
+Subject: [PATCH 2/3] HTTP/2: limited number of DATA frames.
+
+Fixed excessive memory growth and CPU usage if stream windows are
+manipulated in a way that results in generating many small DATA frames.
+Fix is to limit the number of simultaneously allocated DATA frames.
+---
+ src/http/v2/ngx_http_v2.c | 2 ++
+ src/http/v2/ngx_http_v2.h | 2 ++
+ src/http/v2/ngx_http_v2_filter_module.c | 22 +++++++++++++++++-----
+ 3 files changed, 21 insertions(+), 5 deletions(-)
+
+diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
+index be2ef82b..1b01f271 100644
+--- a/src/http/v2/ngx_http_v2.c
++++ b/src/http/v2/ngx_http_v2.c
+@@ -4339,6 +4339,8 @@ ngx_http_v2_close_stream(ngx_http_v2_stream_t *stream, ngx_int_t rc)
+ */
+ pool = stream->pool;
+
++ h2c->frames -= stream->frames;
++
+ ngx_http_free_request(stream->request, rc);
+
+ if (pool != h2c->state.pool) {
+diff --git a/src/http/v2/ngx_http_v2.h b/src/http/v2/ngx_http_v2.h
+index bec22160..715b7d30 100644
+--- a/src/http/v2/ngx_http_v2.h
++++ b/src/http/v2/ngx_http_v2.h
+@@ -192,6 +192,8 @@ struct ngx_http_v2_stream_s {
+
+ ngx_buf_t *preread;
+
++ ngx_uint_t frames;
++
+ ngx_http_v2_out_frame_t *free_frames;
+ ngx_chain_t *free_frame_headers;
+ ngx_chain_t *free_bufs;
+diff --git a/src/http/v2/ngx_http_v2_filter_module.c b/src/http/v2/ngx_http_v2_filter_module.c
+index 029e8ece..c7ee5536 100644
+--- a/src/http/v2/ngx_http_v2_filter_module.c
++++ b/src/http/v2/ngx_http_v2_filter_module.c
+@@ -1661,22 +1661,34 @@ static ngx_http_v2_out_frame_t *
+ ngx_http_v2_filter_get_data_frame(ngx_http_v2_stream_t *stream,
+ size_t len, ngx_chain_t *first, ngx_chain_t *last)
+ {
+- u_char flags;
+- ngx_buf_t *buf;
+- ngx_chain_t *cl;
+- ngx_http_v2_out_frame_t *frame;
++ u_char flags;
++ ngx_buf_t *buf;
++ ngx_chain_t *cl;
++ ngx_http_v2_out_frame_t *frame;
++ ngx_http_v2_connection_t *h2c;
+
+ frame = stream->free_frames;
++ h2c = stream->connection;
+
+ if (frame) {
+ stream->free_frames = frame->next;
+
+- } else {
++ } else if (h2c->frames < 10000) {
+ frame = ngx_palloc(stream->request->pool,
+ sizeof(ngx_http_v2_out_frame_t));
+ if (frame == NULL) {
+ return NULL;
+ }
++
++ stream->frames++;
++ h2c->frames++;
++
++ } else {
++ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
++ "http2 flood detected");
++
++ h2c->connection->error = 1;
++ return NULL;
+ }
+
+ flags = last->buf->last_buf ? NGX_HTTP_V2_END_STREAM_FLAG : 0;
+--
+2.20.1
+
diff --git a/debian/patches/CVE-2019-9513.patch b/debian/patches/CVE-2019-9513.patch
new file mode 100644
index 0000000..edc1c2b
--- /dev/null
+++ b/debian/patches/CVE-2019-9513.patch
@@ -0,0 +1,62 @@
+From bbdc81631b6d322785d8e92788fd400e25a931e6 Mon Sep 17 00:00:00 2001
+From: Ruslan Ermilov
+Date: Tue, 13 Aug 2019 15:43:40 +0300
+Subject: [PATCH 3/3] HTTP/2: limited number of PRIORITY frames.
+
+Fixed excessive CPU usage caused by a peer that continuously shuffles
+priority of streams. Fix is to limit the number of PRIORITY frames.
+---
+ src/http/v2/ngx_http_v2.c | 10 ++++++++++
+ src/http/v2/ngx_http_v2.h | 1 +
+ 2 files changed, 11 insertions(+)
+
+diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
+index 1b01f271..fd6ecb05 100644
+--- a/src/http/v2/ngx_http_v2.c
++++ b/src/http/v2/ngx_http_v2.c
+@@ -275,6 +275,7 @@ ngx_http_v2_init(ngx_event_t *rev)
+ h2scf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_v2_module);
+
+ h2c->concurrent_pushes = h2scf->concurrent_pushes;
++ h2c->priority_limit = h2scf->concurrent_streams;
+
+ h2c->pool = ngx_create_pool(h2scf->pool_size, h2c->connection->log);
+ if (h2c->pool == NULL) {
+@@ -1806,6 +1807,13 @@ ngx_http_v2_state_priority(ngx_http_v2_connection_t *h2c, u_char *pos,
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
+ }
+
++ if (--h2c->priority_limit == 0) {
++ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
++ "client sent too many PRIORITY frames");
++
++ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_ENHANCE_YOUR_CALM);
++ }
++
+ if (end - pos < NGX_HTTP_V2_PRIORITY_SIZE) {
+ return ngx_http_v2_state_save(h2c, pos, end,
+ ngx_http_v2_state_priority);
+@@ -3120,6 +3128,8 @@ ngx_http_v2_create_stream(ngx_http_v2_connection_t *h2c, ngx_uint_t push)
+ h2c->processing++;
+ }
+
++ h2c->priority_limit += h2scf->concurrent_streams;
++
+ return stream;
+ }
+
+diff --git a/src/http/v2/ngx_http_v2.h b/src/http/v2/ngx_http_v2.h
+index 715b7d30..69d55d1c 100644
+--- a/src/http/v2/ngx_http_v2.h
++++ b/src/http/v2/ngx_http_v2.h
+@@ -122,6 +122,7 @@ struct ngx_http_v2_connection_s {
+ ngx_uint_t processing;
+ ngx_uint_t frames;
+ ngx_uint_t idle;
++ ngx_uint_t priority_limit;
+
+ ngx_uint_t pushing;
+ ngx_uint_t concurrent_pushes;
+--
+2.20.1
+
diff --git a/debian/patches/CVE-2019-9516.patch b/debian/patches/CVE-2019-9516.patch
new file mode 100644
index 0000000..0d5ec77
--- /dev/null
+++ b/debian/patches/CVE-2019-9516.patch
@@ -0,0 +1,45 @@
+From 840d8a3e2f126384eb4ee3e5dd7ffe875a5634c5 Mon Sep 17 00:00:00 2001
+From: Sergey Kandaurov
+Date: Tue, 13 Aug 2019 15:43:32 +0300
+Subject: [PATCH 1/3] HTTP/2: reject zero length headers with PROTOCOL_ERROR.
+
+Fixed uncontrolled memory growth if peer sends a stream of
+headers with a 0-length header name and 0-length header value.
+Fix is to reject headers with zero name length.
+---
+ src/http/v2/ngx_http_v2.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
+index 12214e15..be2ef82b 100644
+--- a/src/http/v2/ngx_http_v2.c
++++ b/src/http/v2/ngx_http_v2.c
+@@ -1548,6 +1548,14 @@ ngx_http_v2_state_process_header(ngx_http_v2_connection_t *h2c, u_char *pos,
+ header->name.len = h2c->state.field_end - h2c->state.field_start;
+ header->name.data = h2c->state.field_start;
+
++ if (header->name.len == 0) {
++ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
++ "client sent zero header name length");
++
++ return ngx_http_v2_connection_error(h2c,
++ NGX_HTTP_V2_PROTOCOL_ERROR);
++ }
++
+ return ngx_http_v2_state_field_len(h2c, pos, end);
+ }
+
+@@ -3249,10 +3257,6 @@ ngx_http_v2_validate_header(ngx_http_request_t *r, ngx_http_v2_header_t *header)
+ ngx_uint_t i;
+ ngx_http_core_srv_conf_t *cscf;
+
+- if (header->name.len == 0) {
+- return NGX_ERROR;
+- }
+-
+ r->invalid_header = 0;
+
+ cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
+--
+2.20.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 5b6b799..dfc20c1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,5 @@
0002-Make-sure-signature-stays-the-same-in-all-nginx-buil.patch
0003-define_gnu_source-on-other-glibc-based-platforms.patch
+CVE-2019-9516.patch
+CVE-2019-9511.patch
+CVE-2019-9513.patch
From 71e4915c0fcf970abed0d8c66a3cf86870ea0976 Mon Sep 17 00:00:00 2001
From: Christos Trochalakis
Date: Mon, 19 Aug 2019 11:33:27 +0300
Subject: [PATCH 005/329] Release 1.14.2-3
---
debian/changelog | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 93a36f2..509cc2b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+nginx (1.14.2-3) unstable; urgency=high
+
+ * Backport upstream fixes for 3 CVEs (Closes: #935037)
+ Those fixes affect Nginx HTTP/2 implementation, which might cause
+ excessive memory consumption and CPU usage.
+ (CVE-2019-9511, CVE-2019-9513, CVE-2019-9516).
+
+ -- Christos Trochalakis Mon, 19 Aug 2019 11:30:08 +0300
+
nginx (1.14.2-2) unstable; urgency=medium
[ Kartik Mistry ]
From fce697b5bc7fca3b89cfc8ebd941f8dfc5b13388 Mon Sep 17 00:00:00 2001
From: Christos Trochalakis
Date: Mon, 19 Aug 2019 11:33:14 +0300
Subject: [PATCH 006/329] Handle CVE-2019-9511 CVE-2019-9513 CVE-2019-9516
Several security issues were identified in nginx HTTP/2
implementation, which might cause excessive memory consumption
and CPU usage (CVE-2019-9511, CVE-2019-9513, CVE-2019-9516).
The issues affect nginx compiled with the ngx_http_v2_module (not
compiled by default) if the "http2" option of the "listen" directive
is used in a configuration file.
The issues affect nginx 1.9.5 - 1.17.2.
The issues are fixed in nginx 1.17.3, 1.16.1.
Thanks to Jonathan Looney from Netflix for discovering these issues.
---
debian/patches/CVE-2019-9511.patch | 87 ++++++++++++++++++++++++++++++
debian/patches/CVE-2019-9513.patch | 62 +++++++++++++++++++++
debian/patches/CVE-2019-9516.patch | 45 ++++++++++++++++
debian/patches/series | 3 ++
4 files changed, 197 insertions(+)
create mode 100644 debian/patches/CVE-2019-9511.patch
create mode 100644 debian/patches/CVE-2019-9513.patch
create mode 100644 debian/patches/CVE-2019-9516.patch
diff --git a/debian/patches/CVE-2019-9511.patch b/debian/patches/CVE-2019-9511.patch
new file mode 100644
index 0000000..3b48e0c
--- /dev/null
+++ b/debian/patches/CVE-2019-9511.patch
@@ -0,0 +1,87 @@
+From 3f64486e0c15414dc6368139453dcaca338ddf3e Mon Sep 17 00:00:00 2001
+From: Ruslan Ermilov
+Date: Tue, 13 Aug 2019 15:43:36 +0300
+Subject: [PATCH 2/3] HTTP/2: limited number of DATA frames.
+
+Fixed excessive memory growth and CPU usage if stream windows are
+manipulated in a way that results in generating many small DATA frames.
+Fix is to limit the number of simultaneously allocated DATA frames.
+---
+ src/http/v2/ngx_http_v2.c | 2 ++
+ src/http/v2/ngx_http_v2.h | 2 ++
+ src/http/v2/ngx_http_v2_filter_module.c | 22 +++++++++++++++++-----
+ 3 files changed, 21 insertions(+), 5 deletions(-)
+
+diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
+index be2ef82b..1b01f271 100644
+--- a/src/http/v2/ngx_http_v2.c
++++ b/src/http/v2/ngx_http_v2.c
+@@ -4339,6 +4339,8 @@ ngx_http_v2_close_stream(ngx_http_v2_stream_t *stream, ngx_int_t rc)
+ */
+ pool = stream->pool;
+
++ h2c->frames -= stream->frames;
++
+ ngx_http_free_request(stream->request, rc);
+
+ if (pool != h2c->state.pool) {
+diff --git a/src/http/v2/ngx_http_v2.h b/src/http/v2/ngx_http_v2.h
+index bec22160..715b7d30 100644
+--- a/src/http/v2/ngx_http_v2.h
++++ b/src/http/v2/ngx_http_v2.h
+@@ -192,6 +192,8 @@ struct ngx_http_v2_stream_s {
+
+ ngx_buf_t *preread;
+
++ ngx_uint_t frames;
++
+ ngx_http_v2_out_frame_t *free_frames;
+ ngx_chain_t *free_frame_headers;
+ ngx_chain_t *free_bufs;
+diff --git a/src/http/v2/ngx_http_v2_filter_module.c b/src/http/v2/ngx_http_v2_filter_module.c
+index 029e8ece..c7ee5536 100644
+--- a/src/http/v2/ngx_http_v2_filter_module.c
++++ b/src/http/v2/ngx_http_v2_filter_module.c
+@@ -1661,22 +1661,34 @@ static ngx_http_v2_out_frame_t *
+ ngx_http_v2_filter_get_data_frame(ngx_http_v2_stream_t *stream,
+ size_t len, ngx_chain_t *first, ngx_chain_t *last)
+ {
+- u_char flags;
+- ngx_buf_t *buf;
+- ngx_chain_t *cl;
+- ngx_http_v2_out_frame_t *frame;
++ u_char flags;
++ ngx_buf_t *buf;
++ ngx_chain_t *cl;
++ ngx_http_v2_out_frame_t *frame;
++ ngx_http_v2_connection_t *h2c;
+
+ frame = stream->free_frames;
++ h2c = stream->connection;
+
+ if (frame) {
+ stream->free_frames = frame->next;
+
+- } else {
++ } else if (h2c->frames < 10000) {
+ frame = ngx_palloc(stream->request->pool,
+ sizeof(ngx_http_v2_out_frame_t));
+ if (frame == NULL) {
+ return NULL;
+ }
++
++ stream->frames++;
++ h2c->frames++;
++
++ } else {
++ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
++ "http2 flood detected");
++
++ h2c->connection->error = 1;
++ return NULL;
+ }
+
+ flags = last->buf->last_buf ? NGX_HTTP_V2_END_STREAM_FLAG : 0;
+--
+2.20.1
+
diff --git a/debian/patches/CVE-2019-9513.patch b/debian/patches/CVE-2019-9513.patch
new file mode 100644
index 0000000..edc1c2b
--- /dev/null
+++ b/debian/patches/CVE-2019-9513.patch
@@ -0,0 +1,62 @@
+From bbdc81631b6d322785d8e92788fd400e25a931e6 Mon Sep 17 00:00:00 2001
+From: Ruslan Ermilov
+Date: Tue, 13 Aug 2019 15:43:40 +0300
+Subject: [PATCH 3/3] HTTP/2: limited number of PRIORITY frames.
+
+Fixed excessive CPU usage caused by a peer that continuously shuffles
+priority of streams. Fix is to limit the number of PRIORITY frames.
+---
+ src/http/v2/ngx_http_v2.c | 10 ++++++++++
+ src/http/v2/ngx_http_v2.h | 1 +
+ 2 files changed, 11 insertions(+)
+
+diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
+index 1b01f271..fd6ecb05 100644
+--- a/src/http/v2/ngx_http_v2.c
++++ b/src/http/v2/ngx_http_v2.c
+@@ -275,6 +275,7 @@ ngx_http_v2_init(ngx_event_t *rev)
+ h2scf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_v2_module);
+
+ h2c->concurrent_pushes = h2scf->concurrent_pushes;
++ h2c->priority_limit = h2scf->concurrent_streams;
+
+ h2c->pool = ngx_create_pool(h2scf->pool_size, h2c->connection->log);
+ if (h2c->pool == NULL) {
+@@ -1806,6 +1807,13 @@ ngx_http_v2_state_priority(ngx_http_v2_connection_t *h2c, u_char *pos,
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
+ }
+
++ if (--h2c->priority_limit == 0) {
++ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
++ "client sent too many PRIORITY frames");
++
++ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_ENHANCE_YOUR_CALM);
++ }
++
+ if (end - pos < NGX_HTTP_V2_PRIORITY_SIZE) {
+ return ngx_http_v2_state_save(h2c, pos, end,
+ ngx_http_v2_state_priority);
+@@ -3120,6 +3128,8 @@ ngx_http_v2_create_stream(ngx_http_v2_connection_t *h2c, ngx_uint_t push)
+ h2c->processing++;
+ }
+
++ h2c->priority_limit += h2scf->concurrent_streams;
++
+ return stream;
+ }
+
+diff --git a/src/http/v2/ngx_http_v2.h b/src/http/v2/ngx_http_v2.h
+index 715b7d30..69d55d1c 100644
+--- a/src/http/v2/ngx_http_v2.h
++++ b/src/http/v2/ngx_http_v2.h
+@@ -122,6 +122,7 @@ struct ngx_http_v2_connection_s {
+ ngx_uint_t processing;
+ ngx_uint_t frames;
+ ngx_uint_t idle;
++ ngx_uint_t priority_limit;
+
+ ngx_uint_t pushing;
+ ngx_uint_t concurrent_pushes;
+--
+2.20.1
+
diff --git a/debian/patches/CVE-2019-9516.patch b/debian/patches/CVE-2019-9516.patch
new file mode 100644
index 0000000..0d5ec77
--- /dev/null
+++ b/debian/patches/CVE-2019-9516.patch
@@ -0,0 +1,45 @@
+From 840d8a3e2f126384eb4ee3e5dd7ffe875a5634c5 Mon Sep 17 00:00:00 2001
+From: Sergey Kandaurov
+Date: Tue, 13 Aug 2019 15:43:32 +0300
+Subject: [PATCH 1/3] HTTP/2: reject zero length headers with PROTOCOL_ERROR.
+
+Fixed uncontrolled memory growth if peer sends a stream of
+headers with a 0-length header name and 0-length header value.
+Fix is to reject headers with zero name length.
+---
+ src/http/v2/ngx_http_v2.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
+index 12214e15..be2ef82b 100644
+--- a/src/http/v2/ngx_http_v2.c
++++ b/src/http/v2/ngx_http_v2.c
+@@ -1548,6 +1548,14 @@ ngx_http_v2_state_process_header(ngx_http_v2_connection_t *h2c, u_char *pos,
+ header->name.len = h2c->state.field_end - h2c->state.field_start;
+ header->name.data = h2c->state.field_start;
+
++ if (header->name.len == 0) {
++ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
++ "client sent zero header name length");
++
++ return ngx_http_v2_connection_error(h2c,
++ NGX_HTTP_V2_PROTOCOL_ERROR);
++ }
++
+ return ngx_http_v2_state_field_len(h2c, pos, end);
+ }
+
+@@ -3249,10 +3257,6 @@ ngx_http_v2_validate_header(ngx_http_request_t *r, ngx_http_v2_header_t *header)
+ ngx_uint_t i;
+ ngx_http_core_srv_conf_t *cscf;
+
+- if (header->name.len == 0) {
+- return NGX_ERROR;
+- }
+-
+ r->invalid_header = 0;
+
+ cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
+--
+2.20.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 5b6b799..dfc20c1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,5 @@
0002-Make-sure-signature-stays-the-same-in-all-nginx-buil.patch
0003-define_gnu_source-on-other-glibc-based-platforms.patch
+CVE-2019-9516.patch
+CVE-2019-9511.patch
+CVE-2019-9513.patch
From 117fc2156ffdf628d28bb469b920f7d4cbf19d2c Mon Sep 17 00:00:00 2001
From: Christos Trochalakis
Date: Mon, 19 Aug 2019 13:03:31 +0300
Subject: [PATCH 007/329] Release 1.14.2-2+deb10u1
---
debian/changelog | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 93a36f2..b2c8dc3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+nginx (1.14.2-2+deb10u1) buster-security; urgency=high
+
+ * Backport upstream fixes for 3 CVEs (Closes: #935037)
+ Those fixes affect Nginx HTTP/2 implementation, which might cause
+ excessive memory consumption and CPU usage.
+ (CVE-2019-9511, CVE-2019-9513, CVE-2019-9516).
+
+ -- Christos Trochalakis Tue, 13 Aug 2019 21:10:28 +0300
+
nginx (1.14.2-2) unstable; urgency=medium
[ Kartik Mistry ]
From deba07f09f0f530f083263c966e72331911a28a4 Mon Sep 17 00:00:00 2001
From: Christos Trochalakis
Date: Sun, 8 Sep 2019 10:33:34 +0300
Subject: [PATCH 008/329] Follow stable 1.16 releases
---
debian/watch | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/debian/watch b/debian/watch
index 42f4680..1aeff3e 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,3 @@
version=3
opts=pgpsigurlmangle=s/$/.asc/ \
-https://nginx.org/download/nginx-(1\.14\.\d+)\.tar\.gz
+https://nginx.org/download/nginx-(1\.16\.\d+)\.tar\.gz
From c717ecb9266f65e0bd1579588710a2782bbb8e1f Mon Sep 17 00:00:00 2001
From: Christos Trochalakis
Date: Sun, 8 Sep 2019 10:36:13 +0300
Subject: [PATCH 009/329] New upstream version 1.16.1
---
CHANGES | 254 +++-
CHANGES.ru | 260 +++-
LICENSE | 4 +-
auto/cc/clang | 3 +-
auto/cc/msvc | 2 +-
auto/lib/google-perftools/conf | 3 +-
auto/lib/libgd/conf | 6 +-
auto/lib/libxslt/conf | 4 +-
auto/make | 2 +-
auto/modules | 21 +
auto/options | 10 +
auto/os/linux | 2 +
auto/os/win32 | 8 +-
auto/sources | 2 +
conf/mime.types | 4 +-
contrib/vim/syntax/nginx.vim | 79 +-
html/50x.html | 2 +-
src/core/nginx.h | 4 +-
src/core/ngx_buf.c | 1 +
src/core/ngx_conf_file.c | 9 +-
src/core/ngx_connection.c | 71 +-
src/core/ngx_connection.h | 7 +-
src/core/ngx_core.h | 1 +
src/core/ngx_cycle.c | 67 +-
src/core/ngx_file.c | 27 +-
src/core/ngx_inet.c | 468 +++---
src/core/ngx_inet.h | 2 +
src/core/ngx_output_chain.c | 64 +-
src/core/ngx_resolver.c | 133 +-
src/core/ngx_slab.c | 3 +-
src/core/ngx_string.c | 10 +-
src/core/ngx_string.h | 2 +
src/core/ngx_syslog.c | 38 +-
src/core/ngx_syslog.h | 1 -
src/core/ngx_times.h | 4 +-
src/event/modules/ngx_eventport_module.c | 2 -
src/event/modules/ngx_poll_module.c | 2 +-
src/event/modules/ngx_win32_poll_module.c | 435 ++++++
src/event/modules/ngx_win32_select_module.c | 17 +-
src/event/ngx_event.c | 40 +
src/event/ngx_event.h | 9 +-
src/event/ngx_event_accept.c | 346 +----
src/event/ngx_event_connect.c | 16 +-
src/event/ngx_event_connect.h | 2 +
src/event/ngx_event_openssl.c | 1267 ++++++++++++++---
src/event/ngx_event_openssl.h | 27 +-
src/event/ngx_event_openssl_stapling.c | 7 +-
src/event/ngx_event_udp.c | 663 +++++++++
src/http/modules/ngx_http_autoindex_module.c | 70 +-
src/http/modules/ngx_http_dav_module.c | 4 +-
src/http/modules/ngx_http_fastcgi_module.c | 13 +-
src/http/modules/ngx_http_geo_module.c | 13 +
src/http/modules/ngx_http_grpc_module.c | 21 +-
src/http/modules/ngx_http_limit_req_module.c | 63 +-
src/http/modules/ngx_http_memcached_module.c | 13 +-
src/http/modules/ngx_http_proxy_module.c | 21 +-
.../modules/ngx_http_random_index_module.c | 2 +-
src/http/modules/ngx_http_rewrite_module.c | 10 +-
src/http/modules/ngx_http_scgi_module.c | 13 +-
src/http/modules/ngx_http_ssl_module.c | 190 ++-
src/http/modules/ngx_http_ssl_module.h | 4 +
.../modules/ngx_http_upstream_hash_module.c | 8 +-
.../ngx_http_upstream_ip_hash_module.c | 8 +-
.../ngx_http_upstream_keepalive_module.c | 41 +-
.../modules/ngx_http_upstream_random_module.c | 502 +++++++
.../modules/ngx_http_userid_filter_module.c | 7 +
src/http/modules/ngx_http_uwsgi_module.c | 31 +-
src/http/ngx_http.c | 38 +-
src/http/ngx_http.h | 4 +
src/http/ngx_http_core_module.c | 87 +-
src/http/ngx_http_core_module.h | 8 +-
src/http/ngx_http_file_cache.c | 44 +-
src/http/ngx_http_parse.c | 5 +
src/http/ngx_http_request.c | 252 +++-
src/http/ngx_http_request.h | 5 +
src/http/ngx_http_script.c | 28 +
src/http/ngx_http_script.h | 2 +
src/http/ngx_http_special_response.c | 68 +-
src/http/ngx_http_upstream.c | 89 +-
src/http/ngx_http_upstream.h | 4 +-
src/http/ngx_http_upstream_round_robin.c | 2 +-
src/http/ngx_http_variables.c | 4 +-
src/http/ngx_http_write_filter_module.c | 40 +-
src/http/v2/ngx_http_v2.c | 96 +-
src/http/v2/ngx_http_v2.h | 3 +
src/http/v2/ngx_http_v2_filter_module.c | 48 +-
src/mail/ngx_mail.c | 42 +-
src/mail/ngx_mail.h | 3 +-
src/mail/ngx_mail_core_module.c | 92 +-
src/mail/ngx_mail_handler.c | 18 +-
src/mail/ngx_mail_ssl_module.c | 96 +-
src/mail/ngx_mail_ssl_module.h | 1 +
src/os/unix/ngx_file_aio_read.c | 2 +-
src/os/unix/ngx_files.h | 3 -
src/os/unix/ngx_freebsd_config.h | 6 +
src/os/unix/ngx_thread.h | 4 +-
src/stream/ngx_stream.c | 46 +-
src/stream/ngx_stream.h | 3 +-
src/stream/ngx_stream_core_module.c | 121 +-
src/stream/ngx_stream_geo_module.c | 13 +
src/stream/ngx_stream_proxy_module.c | 279 +++-
src/stream/ngx_stream_ssl_module.c | 238 +++-
src/stream/ngx_stream_ssl_module.h | 7 +
src/stream/ngx_stream_ssl_preread_module.c | 111 +-
src/stream/ngx_stream_upstream.c | 16 +-
src/stream/ngx_stream_upstream.h | 2 +
src/stream/ngx_stream_upstream_hash_module.c | 8 +-
.../ngx_stream_upstream_random_module.c | 502 +++++++
src/stream/ngx_stream_upstream_round_robin.c | 2 +-
src/stream/ngx_stream_write_filter_module.c | 40 +-
110 files changed, 6258 insertions(+), 1669 deletions(-)
create mode 100644 src/event/modules/ngx_win32_poll_module.c
create mode 100644 src/event/ngx_event_udp.c
create mode 100644 src/http/modules/ngx_http_upstream_random_module.c
create mode 100644 src/stream/ngx_stream_upstream_random_module.c
diff --git a/CHANGES b/CHANGES
index 597c270..8e7382b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,38 +1,99 @@
-Changes with nginx 1.14.2 04 Dec 2018
+Changes with nginx 1.16.1 13 Aug 2019
- *) Bugfix: nginx could not be built by gcc 8.1.
+ *) Security: when using HTTP/2 a client might cause excessive memory
+ consumption and CPU usage (CVE-2019-9511, CVE-2019-9513,
+ CVE-2019-9516).
- *) Bugfix: nginx could not be built on Fedora 28 Linux.
- *) Bugfix: in handling of client addresses when using unix domain listen
- sockets to work with datagrams on Linux.
+Changes with nginx 1.16.0 23 Apr 2019
- *) Change: the logging level of the "http request", "https proxy
- request", "unsupported protocol", "version too low", "no suitable key
- share", and "no suitable signature algorithm" SSL errors has been
- lowered from "crit" to "info".
+ *) 1.16.x stable branch.
- *) Bugfix: when using OpenSSL 1.1.0 or newer it was not possible to
- switch off "ssl_prefer_server_ciphers" in a virtual server if it was
- switched on in the default server.
- *) Bugfix: nginx could not be built with LibreSSL 2.8.0.
+Changes with nginx 1.15.12 16 Apr 2019
- *) Bugfix: if nginx was built with OpenSSL 1.1.0 and used with OpenSSL
- 1.1.1, the TLS 1.3 protocol was always enabled.
+ *) Bugfix: a segmentation fault might occur in a worker process if
+ variables were used in the "ssl_certificate" or "ssl_certificate_key"
+ directives and OCSP stapling was enabled.
- *) Bugfix: sending a disk-buffered request body to a gRPC backend might
- fail.
- *) Bugfix: connections with some gRPC backends might not be cached when
- using the "keepalive" directive.
+Changes with nginx 1.15.11 09 Apr 2019
+
+ *) Bugfix: in the "ssl_stapling_file" directive on Windows.
+
+
+Changes with nginx 1.15.10 26 Mar 2019
+
+ *) Change: when using a hostname in the "listen" directive nginx now
+ creates listening sockets for all addresses the hostname resolves to
+ (previously, only the first address was used).
+
+ *) Feature: port ranges in the "listen" directive.
+
+ *) Feature: loading of SSL certificates and secret keys from variables.
+
+ *) Workaround: the $ssl_server_name variable might be empty when using
+ OpenSSL 1.1.1.
+
+ *) Bugfix: nginx/Windows could not be built with Visual Studio 2015 or
+ newer; the bug had appeared in 1.15.9.
+
+
+Changes with nginx 1.15.9 26 Feb 2019
+
+ *) Feature: variables support in the "ssl_certificate" and
+ "ssl_certificate_key" directives.
+
+ *) Feature: the "poll" method is now available on Windows when using
+ Windows Vista or newer.
+
+ *) Bugfix: if the "select" method was used on Windows and an error
+ occurred while establishing a backend connection, nginx waited for
+ the connection establishment timeout to expire.
+
+ *) Bugfix: the "proxy_upload_rate" and "proxy_download_rate" directives
+ in the stream module worked incorrectly when proxying UDP datagrams.
+
+
+Changes with nginx 1.15.8 25 Dec 2018
+
+ *) Feature: the $upstream_bytes_sent variable.
+ Thanks to Piotr Sikora.
+
+ *) Feature: new directives in vim syntax highlighting scripts.
+ Thanks to Gena Makhomed.
+
+ *) Bugfix: in the "proxy_cache_background_update" directive.
+
+ *) Bugfix: in the "geo" directive when using unix domain listen sockets.
+
+ *) Workaround: the "ignoring stale global SSL error ... bad length"
+ alerts might appear in logs when using the "ssl_early_data" directive
+ with OpenSSL.
+
+ *) Bugfix: in nginx/Windows.
+
+ *) Bugfix: in the ngx_http_autoindex_module on 32-bit platforms.
+
+
+Changes with nginx 1.15.7 27 Nov 2018
+
+ *) Feature: the "proxy_requests" directive in the stream module.
+
+ *) Feature: the "delay" parameter of the "limit_req" directive.
+ Thanks to Vladislav Shabanov and Peter Shchuchkin.
+
+ *) Bugfix: memory leak on errors during reconfiguration.
+
+ *) Bugfix: in the $upstream_response_time, $upstream_connect_time, and
+ $upstream_header_time variables.
*) Bugfix: a segmentation fault might occur in a worker process if the
ngx_http_mp4_module was used on 32-bit platforms.
-Changes with nginx 1.14.1 06 Nov 2018
+Changes with nginx 1.15.6 06 Nov 2018
*) Security: when using HTTP/2 a client might cause excessive memory
consumption (CVE-2018-16843) and CPU usage (CVE-2018-16844).
@@ -41,13 +102,162 @@ Changes with nginx 1.14.1 06 Nov 2018
ngx_http_mp4_module might result in worker process memory disclosure
(CVE-2018-16845).
+ *) Feature: the "proxy_socket_keepalive", "fastcgi_socket_keepalive",
+ "grpc_socket_keepalive", "memcached_socket_keepalive",
+ "scgi_socket_keepalive", and "uwsgi_socket_keepalive" directives.
+
+ *) Bugfix: if nginx was built with OpenSSL 1.1.0 and used with OpenSSL
+ 1.1.1, the TLS 1.3 protocol was always enabled.
+
*) Bugfix: working with gRPC backends might result in excessive memory
consumption.
-Changes with nginx 1.14.0 17 Apr 2018
+Changes with nginx 1.15.5 02 Oct 2018
- *) 1.14.x stable branch.
+ *) Bugfix: a segmentation fault might occur in a worker process when
+ using OpenSSL 1.1.0h or newer; the bug had appeared in 1.15.4.
+
+ *) Bugfix: of minor potential bugs.
+
+
+Changes with nginx 1.15.4 25 Sep 2018
+
+ *) Feature: now the "ssl_early_data" directive can be used with OpenSSL.
+
+ *) Bugfix: in the ngx_http_uwsgi_module.
+ Thanks to Chris Caputo.
+
+ *) Bugfix: connections with some gRPC backends might not be cached when
+ using the "keepalive" directive.
+
+ *) Bugfix: a socket leak might occur when using the "error_page"
+ directive to redirect early request processing errors, notably errors
+ with code 400.
+
+ *) Bugfix: the "return" directive did not change the response code when
+ returning errors if the request was redirected by the "error_page"
+ directive.
+
+ *) Bugfix: standard error pages and responses of the
+ ngx_http_autoindex_module module used the "bgcolor" attribute, and
+ might be displayed incorrectly when using custom color settings in
+ browsers.
+ Thanks to Nova DasSarma.
+
+ *) Change: the logging level of the "no suitable key share" and "no
+ suitable signature algorithm" SSL errors has been lowered from "crit"
+ to "info".
+
+
+Changes with nginx 1.15.3 28 Aug 2018
+
+ *) Feature: now TLSv1.3 can be used with BoringSSL.
+
+ *) Feature: the "ssl_early_data" directive, currently available with
+ BoringSSL.
+
+ *) Feature: the "keepalive_timeout" and "keepalive_requests" directives
+ in the "upstream" block.
+
+ *) Bugfix: the ngx_http_dav_module did not truncate destination file
+ when copying a file over an existing one with the COPY method.
+
+ *) Bugfix: the ngx_http_dav_module used zero access rights on the
+ destination file and did not preserve file modification time when
+ moving a file between different file systems with the MOVE method.
+
+ *) Bugfix: the ngx_http_dav_module used default access rights when
+ copying a file with the COPY method.
+
+ *) Workaround: some clients might not work when using HTTP/2; the bug
+ had appeared in 1.13.5.
+
+ *) Bugfix: nginx could not be built with LibreSSL 2.8.0.
+
+
+Changes with nginx 1.15.2 24 Jul 2018
+
+ *) Feature: the $ssl_preread_protocol variable in the
+ ngx_stream_ssl_preread_module.
+
+ *) Feature: now when using the "reset_timedout_connection" directive
+ nginx will reset connections being closed with the 444 code.
+
+ *) Change: a logging level of the "http request", "https proxy request",
+ "unsupported protocol", and "version too low" SSL errors has been
+ lowered from "crit" to "info".
+
+ *) Bugfix: DNS requests were not resent if initial sending of a request
+ failed.
+
+ *) Bugfix: the "reuseport" parameter of the "listen" directive was
+ ignored if the number of worker processes was specified after the
+ "listen" directive.
+
+ *) Bugfix: when using OpenSSL 1.1.0 or newer it was not possible to
+ switch off "ssl_prefer_server_ciphers" in a virtual server if it was
+ switched on in the default server.
+
+ *) Bugfix: SSL session reuse with upstream servers did not work with the
+ TLS 1.3 protocol.
+
+
+Changes with nginx 1.15.1 03 Jul 2018
+
+ *) Feature: the "random" directive inside the "upstream" block.
+
+ *) Feature: improved performance when using the "hash" and "ip_hash"
+ directives with the "zone" directive.
+
+ *) Feature: the "reuseport" parameter of the "listen" directive now uses
+ SO_REUSEPORT_LB on FreeBSD 12.
+
+ *) Bugfix: HTTP/2 server push did not work if SSL was terminated by a
+ proxy server in front of nginx.
+
+ *) Bugfix: the "tcp_nopush" directive was always used on backend
+ connections.
+
+ *) Bugfix: sending a disk-buffered request body to a gRPC backend might
+ fail.
+
+
+Changes with nginx 1.15.0 05 Jun 2018
+
+ *) Change: the "ssl" directive is deprecated; the "ssl" parameter of the
+ "listen" directive should be used instead.
+
+ *) Change: now nginx detects missing SSL certificates during
+ configuration testing when using the "ssl" parameter of the "listen"
+ directive.
+
+ *) Feature: now the stream module can handle multiple incoming UDP
+ datagrams from a client within a single session.
+
+ *) Bugfix: it was possible to specify an incorrect response code in the
+ "proxy_cache_valid" directive.
+
+ *) Bugfix: nginx could not be built by gcc 8.1.
+
+ *) Bugfix: logging to syslog stopped on local IP address changes.
+
+ *) Bugfix: nginx could not be built by clang with CUDA SDK installed;
+ the bug had appeared in 1.13.8.
+
+ *) Bugfix: "getsockopt(TCP_FASTOPEN) ... failed" messages might appear
+ in logs during binary upgrade when using unix domain listen sockets
+ on FreeBSD.
+
+ *) Bugfix: nginx could not be built on Fedora 28 Linux.
+
+ *) Bugfix: request processing rate might exceed configured rate when
+ using the "limit_req" directive.
+
+ *) Bugfix: in handling of client addresses when using unix domain listen
+ sockets to work with datagrams on Linux.
+
+ *) Bugfix: in memory allocation error handling.
Changes with nginx 1.13.12 10 Apr 2018
diff --git a/CHANGES.ru b/CHANGES.ru
index 8c260fe..5d60f41 100644
--- a/CHANGES.ru
+++ b/CHANGES.ru
@@ -1,39 +1,103 @@
-Изменения в nginx 1.14.2 04.12.2018
+Изменения в nginx 1.16.1 13.08.2019
- *) Исправление: nginx не собирался gcc 8.1.
+ *) Безопасность: при использовании HTTP/2 клиент мог вызвать чрезмерное
+ потребление памяти и ресурсов процессора (CVE-2019-9511,
+ CVE-2019-9513, CVE-2019-9516).
- *) Исправление: nginx не собирался на Fedora 28 Linux.
- *) Исправление: в обработке адресов клиентов при использовании unix
- domain listen-сокетов для работы с датаграммами на Linux.
+Изменения в nginx 1.16.0 23.04.2019
- *) Изменение: уровень логгирования ошибок SSL "http request", "https
- proxy request", "unsupported protocol", "version too low", "no
- suitable key share" и "no suitable signature algorithm" понижен с
- уровня crit до info.
+ *) Стабильная ветка 1.16.x.
- *) Исправление: при использовании OpenSSL 1.1.0 и новее директиву
- ssl_prefer_server_ciphers нельзя было выключить в виртуальном
- сервере, если она была включена в сервере по умолчанию.
- *) Исправление: nginx не собирался с LibreSSL 2.8.0.
+Изменения в nginx 1.15.12 16.04.2019
- *) Исправление: если nginx был собран с OpenSSL 1.1.0, а использовался с
- OpenSSL 1.1.1, протокол TLS 1.3 всегда был разрешён.
+ *) Исправление: в рабочем процессе мог произойти segmentation fault,
+ если в директивах ssl_certificate или ssl_certificate_key
+ использовались переменные и был включён OCSP stapling.
- *) Исправление: при отправке сохранённого на диск тела запроса на
- gRPC-бэкенд могли возникать ошибки.
- *) Исправление: соединения к некоторым gRPC-бэкендам могли не
- кэшироваться при использовании директивы keepalive.
+Изменения в nginx 1.15.11 09.04.2019
+
+ *) Исправление: в директиве ssl_stapling_file на Windows.
+
+
+Изменения в nginx 1.15.10 26.03.2019
+
+ *) Изменение: теперь при использовании имени хоста в директиве listen
+ nginx создаёт listen-сокеты для всех адресов, соответствующих этому
+ имени (ранее использовался только первый адрес).
+
+ *) Добавление: диапазоны портов в директиве listen.
+
+ *) Добавление: возможность загрузки SSL-сертификатов и секретных ключей
+ из переменных.
+
+ *) Изменение: переменная $ssl_server_name могла быть пустой при
+ использовании OpenSSL 1.1.1.
+
+ *) Исправление: nginx/Windows не собирался с Visual Studio 2015 и новее;
+ ошибка появилась в 1.15.9.
+
+
+Изменения в nginx 1.15.9 26.02.2019
+
+ *) Добавление: директивы ssl_certificate и ssl_certificate_key
+ поддерживают переменные.
+
+ *) Добавление: метод poll теперь доступен на Windows при использовании
+ Windows Vista и новее.
+
+ *) Исправление: если при использовании метода select на Windows
+ происходила ошибка при установлении соединения с бэкендом, nginx
+ ожидал истечения таймаута на установление соединения.
+
+ *) Исправление: директивы proxy_upload_rate и proxy_download_rate в
+ модуле stream работали некорректно при проксировании UDP-пакетов.
+
+
+Изменения в nginx 1.15.8 25.12.2018
+
+ *) Добавление: переменная $upstream_bytes_sent.
+ Спасибо Piotr Sikora.
+
+ *) Добавление: новые директивы в скриптах подсветки синтаксиса для vim.
+ Спасибо Геннадию Махомеду.
+
+ *) Исправление: в директиве proxy_cache_background_update.
+
+ *) Исправление: в директиве geo при использовании unix domain
+ listen-сокетов.
+
+ *) Изменение: при использовании директивы ssl_early_data с OpenSSL в
+ логах могли появляться сообщения "ignoring stale global SSL error ...
+ bad length".
+
+ *) Исправление: в nginx/Windows.
+
+ *) Исправление: в модуле ngx_http_autoindex_module на 32-битных
+ платформах.
+
+
+Изменения в nginx 1.15.7 27.11.2018
+
+ *) Добавление: директива proxy_requests в модуле stream.
+
+ *) Добавление: параметр "delay" директивы "limit_req".
+ Спасибо Владиславу Шабанову и Петру Щучкину.
+
+ *) Исправление: утечки памяти в случае ошибок при переконфигурации.
+
+ *) Исправление: в переменных $upstream_response_time,
+ $upstream_connect_time и $upstream_header_time.
*) Исправление: в рабочем процессе мог произойти segmentation fault,
если использовался модуль ngx_http_mp4_module на 32-битных
платформах.
-Изменения в nginx 1.14.1 06.11.2018
+Изменения в nginx 1.15.6 06.11.2018
*) Безопасность: при использовании HTTP/2 клиент мог вызвать чрезмерное
потреблению памяти (CVE-2018-16843) и ресурсов процессора
@@ -43,13 +107,165 @@
ngx_http_mp4_module содержимое памяти рабочего процесса могло быть
отправлено клиенту (CVE-2018-16845).
+ *) Добавление: директивы proxy_socket_keepalive,
+ fastcgi_socket_keepalive, grpc_socket_keepalive,
+ memcached_socket_keepalive, scgi_socket_keepalive и
+ uwsgi_socket_keepalive.
+
+ *) Исправление: если nginx был собран с OpenSSL 1.1.0, а использовался с
+ OpenSSL 1.1.1, протокол TLS 1.3 всегда был разрешён.
+
*) Исправление: при работе с gRPC-бэкендами могло расходоваться большое
количество памяти.
-Изменения в nginx 1.14.0 17.04.2018
+Изменения в nginx 1.15.5 02.10.2018
- *) Стабильная ветка 1.14.x.
+ *) Исправление: при использовании OpenSSL 1.1.0h и новее в рабочем
+ процессе мог произойти segmentation fault; ошибка появилась в 1.15.4.
+
+ *) Исправление: незначительных потенциальных ошибок.
+
+
+Изменения в nginx 1.15.4 25.09.2018
+
+ *) Добавление: теперь директиву ssl_early_data можно использовать с
+ OpenSSL.
+
+ *) Исправление: в модуле ngx_http_uwsgi_module.
+ Спасибо Chris Caputo.
+
+ *) Исправление: соединения к некоторым gRPC-бэкендам могли не
+ кэшироваться при использовании директивы keepalive.
+
+ *) Исправление: при использовании директивы error_page для
+ перенаправления ошибок, возникающих на ранних этапах обработки
+ запроса, в частности ошибок с кодом 400, могла происходить утечка
+ сокетов.
+
+ *) Исправление: директива return при возврате ошибок не изменяла код
+ ответа, если запрос был перенаправлен с помощью директивы error_page.
+
+ *) Исправление: стандартные сообщения об ошибках и ответы модуля
+ ngx_http_autoindex_module содержали атрибут bgcolor, что могло
+ приводить к их некорректному отображению при использовании
+ пользовательских настроек цветов в браузерах.
+ Спасибо Nova DasSarma.
+
+ *) Изменение: уровень логгирования ошибок SSL "no suitable key share" и
+ "no suitable signature algorithm" понижен с уровня crit до info.
+
+
+Изменения в nginx 1.15.3 28.08.2018
+
+ *) Добавление: теперь TLSv1.3 можно использовать с BoringSSL.
+
+ *) Добавление: директива ssl_early_data, сейчас доступна при
+ использовании BoringSSL.
+
+ *) Добавление: директивы keepalive_timeout и keepalive_requests в блоке
+ upstream.
+
+ *) Исправление: модуль ngx_http_dav_module при копировании файла поверх
+ существующего файла с помощью метода COPY не обнулял целевой файл.
+
+ *) Исправление: модуль ngx_http_dav_module при перемещении файла между
+ файловыми системами с помощью метода MOVE устанавливал нулевые права
+ доступа на результирующий файл и не сохранял время изменения файла.
+
+ *) Исправление: модуль ngx_http_dav_module при копировании файла с
+ помощью метода COPY для результирующего файла использовал права
+ доступа по умолчанию.
+
+ *) Изменение: некоторые клиенты могли не работать при использовании
+ HTTP/2; ошибка появилась в 1.13.5.
+
+ *) Исправление: nginx не собирался с LibreSSL 2.8.0.
+
+
+Изменения в nginx 1.15.2 24.07.2018
+
+ *) Добавление: переменная $ssl_preread_protocol в модуле
+ ngx_stream_ssl_preread_module.
+
+ *) Добавление: теперь при использовании директивы
+ reset_timedout_connection nginx сбрасывает соединения, закрываемые с
+ кодом 444.
+
+ *) Изменение: уровень логгирования ошибок SSL "http request", "https
+ proxy request", "unsupported protocol" и "version too low" понижен с
+ уровня crit до info.
+
+ *) Исправление: запросы к DNS-серверу не отправлялись повторно, если при
+ первой попытке отправки происходила ошибка.
+
+ *) Исправление: параметр reuseport директивы listen игнорировался, если
+ количество рабочих процессов было задано после директивы listen.
+
+ *) Исправление: при использовании OpenSSL 1.1.0 и новее директиву
+ ssl_prefer_server_ciphers нельзя было выключить в виртуальном
+ сервере, если она была включена в сервере по умолчанию.
+
+ *) Исправление: повторное использование SSL-сессий к бэкендам не
+ работало с протоколом TLS 1.3.
+
+
+Изменения в nginx 1.15.1 03.07.2018
+
+ *) Добавление: директива random в блоке upstream.
+
+ *) Добавление: улучшена производительность при использовании директив
+ hash и ip_hash совместно с директивой zone.
+
+ *) Добавление: параметр reuseport директивы listen теперь использует
+ SO_REUSEPORT_LB на FreeBSD 12.
+
+ *) Исправление: HTTP/2 server push не работал, если SSL терминировался
+ прокси-сервером перед nginx'ом.
+
+ *) Исправление: директива tcp_nopush всегда использовалась для
+ соединений к бэкендам.
+
+ *) Исправление: при отправке сохранённого на диск тела запроса на
+ gRPC-бэкенд могли возникать ошибки.
+
+
+Изменения в nginx 1.15.0 05.06.2018
+
+ *) Изменение: директива "ssl" теперь считается устаревшей; вместо неё
+ следует использовать параметр ssl директивы listen.
+
+ *) Изменение: теперь при использовании директивы listen с параметром ssl
+ nginx определяет отсутствие SSL-сертификатов при тестировании
+ конфигурации.
+
+ *) Добавление: теперь модуль stream умеет обрабатывать несколько
+ входящих UDP-пакетов от клиента в рамках одной сессии.
+
+ *) Исправление: в директиве proxy_cache_valid можно было указать
+ некорректный код ответа.
+
+ *) Исправление: nginx не собирался gcc 8.1.
+
+ *) Исправление: логгирование в syslog останавливалось при изменении
+ локального IP-адреса.
+
+ *) Исправление: nginx не собирался компилятором clang, если был
+ установлен CUDA SDK; ошибка появилась в 1.13.8.
+
+ *) Исправление: при использовании unix domain listen-сокетов на FreeBSD
+ в процессе обновления исполняемого файла в логе могли появляться
+ сообщения "getsockopt(TCP_FASTOPEN) ... failed".
+
+ *) Исправление: nginx не собирался на Fedora 28 Linux.
+
+ *) Исправление: при использовании директивы limit_req заданная скорость
+ обработки запросов могла не соблюдаться.
+
+ *) Исправление: в обработке адресов клиентов при использовании unix
+ domain listen-сокетов для работы с датаграммами на Linux.
+
+ *) Исправление: в обработке ошибок выделения памяти.
Изменения в nginx 1.13.12 10.04.2018
diff --git a/LICENSE b/LICENSE
index 9401174..c63e0ba 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2002-2018 Igor Sysoev
- * Copyright (C) 2011-2018 Nginx, Inc.
+ * Copyright (C) 2002-2019 Igor Sysoev
+ * Copyright (C) 2011-2019 Nginx, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/auto/cc/clang b/auto/cc/clang
index 9d900c2..a962ee2 100644
--- a/auto/cc/clang
+++ b/auto/cc/clang
@@ -6,7 +6,8 @@
NGX_CLANG_VER=`$CC -v 2>&1 | grep 'version' 2>&1 \
- | sed -e 's/^.* version \(.*\)/\1/'`
+ | sed -n -e 's/^.*clang version \(.*\)/\1/p' \
+ -e 's/^.*LLVM version \(.*\)/\1/p'`
echo " + clang version: $NGX_CLANG_VER"
diff --git a/auto/cc/msvc b/auto/cc/msvc
index 8257252..68435ff 100644
--- a/auto/cc/msvc
+++ b/auto/cc/msvc
@@ -108,7 +108,7 @@ CORE_LIBS="$CORE_LIBS kernel32.lib user32.lib"
# msvc under Wine issues
# C1902: Program database manager mismatch; please check your installation
if [ -z "$NGX_WINE" ]; then
- CFLAGS="$CFLAGS -Zi"
+ CFLAGS="$CFLAGS -Zi -Fd$NGX_OBJS/nginx.pdb"
CORE_LINK="$CORE_LINK -debug"
fi
diff --git a/auto/lib/google-perftools/conf b/auto/lib/google-perftools/conf
index 5d5ddae..7f1a911 100644
--- a/auto/lib/google-perftools/conf
+++ b/auto/lib/google-perftools/conf
@@ -9,7 +9,8 @@
ngx_feature_incs=
ngx_feature_path=
ngx_feature_libs="-lprofiler"
- ngx_feature_test="ProfilerStop()"
+ ngx_feature_test="void ProfilerStop(void);
+ ProfilerStop()"
. auto/feature
diff --git a/auto/lib/libgd/conf b/auto/lib/libgd/conf
index 87761f1..6786397 100644
--- a/auto/lib/libgd/conf
+++ b/auto/lib/libgd/conf
@@ -9,7 +9,8 @@
ngx_feature_incs="#include "
ngx_feature_path=
ngx_feature_libs="-lgd"
- ngx_feature_test="gdImagePtr img = gdImageCreateFromGifPtr(1, NULL);"
+ ngx_feature_test="gdImagePtr img = gdImageCreateFromGifPtr(1, NULL);
+ (void) img"
. auto/feature
@@ -76,7 +77,8 @@ if [ $ngx_found = yes ]; then
ngx_feature="GD WebP support"
ngx_feature_name="NGX_HAVE_GD_WEBP"
- ngx_feature_test="gdImagePtr img = gdImageCreateFromWebpPtr(1, NULL);"
+ ngx_feature_test="gdImagePtr img = gdImageCreateFromWebpPtr(1, NULL);
+ (void) img"
. auto/feature
else
diff --git a/auto/lib/libxslt/conf b/auto/lib/libxslt/conf
index 3a0f37b..3063ac7 100644
--- a/auto/lib/libxslt/conf
+++ b/auto/lib/libxslt/conf
@@ -16,8 +16,8 @@
ngx_feature_libs="-lxml2 -lxslt"
ngx_feature_test="xmlParserCtxtPtr ctxt = NULL;
xsltStylesheetPtr sheet = NULL;
- xmlDocPtr doc;
- doc = xmlParseChunk(ctxt, NULL, 0, 0);
+ xmlDocPtr doc = NULL;
+ xmlParseChunk(ctxt, NULL, 0, 0);
xsltApplyStylesheet(sheet, doc, NULL);"
. auto/feature
diff --git a/auto/make b/auto/make
index 7ddd100..34c40cd 100644
--- a/auto/make
+++ b/auto/make
@@ -229,7 +229,7 @@ build: binary modules manpage
binary: $NGX_OBJS${ngx_dirsep}nginx$ngx_binext
$NGX_OBJS${ngx_dirsep}nginx$ngx_binext: $ngx_deps$ngx_spacer
- \$(LINK) $ngx_long_start$ngx_binout$NGX_OBJS${ngx_dirsep}nginx$ngx_long_cont$ngx_objs$ngx_libs$ngx_link$ngx_main_link
+ \$(LINK) $ngx_long_start$ngx_binout$NGX_OBJS${ngx_dirsep}nginx$ngx_binext$ngx_long_cont$ngx_objs$ngx_libs$ngx_link$ngx_main_link
$ngx_rcc
$ngx_long_end
diff --git a/auto/modules b/auto/modules
index 73a9bae..09bfcb0 100644
--- a/auto/modules
+++ b/auto/modules
@@ -878,6 +878,17 @@ if [ $HTTP = YES ]; then
. auto/module
fi
+ if [ $HTTP_UPSTREAM_RANDOM = YES ]; then
+ ngx_module_name=ngx_http_upstream_random_module
+ ngx_module_incs=
+ ngx_module_deps=
+ ngx_module_srcs=src/http/modules/ngx_http_upstream_random_module.c
+ ngx_module_libs=
+ ngx_module_link=$HTTP_UPSTREAM_RANDOM
+
+ . auto/module
+ fi
+
if [ $HTTP_UPSTREAM_KEEPALIVE = YES ]; then
ngx_module_name=ngx_http_upstream_keepalive_module
ngx_module_incs=
@@ -1143,6 +1154,16 @@ if [ $STREAM != NO ]; then
. auto/module
fi
+ if [ $STREAM_UPSTREAM_RANDOM = YES ]; then
+ ngx_module_name=ngx_stream_upstream_random_module
+ ngx_module_deps=
+ ngx_module_srcs=src/stream/ngx_stream_upstream_random_module.c
+ ngx_module_libs=
+ ngx_module_link=$STREAM_UPSTREAM_RANDOM
+
+ . auto/module
+ fi
+
if [ $STREAM_UPSTREAM_ZONE = YES ]; then
have=NGX_STREAM_UPSTREAM_ZONE . auto/have
diff --git a/auto/options b/auto/options
index 59f0449..d8b421b 100644
--- a/auto/options
+++ b/auto/options
@@ -102,6 +102,7 @@ HTTP_GZIP_STATIC=NO
HTTP_UPSTREAM_HASH=YES
HTTP_UPSTREAM_IP_HASH=YES
HTTP_UPSTREAM_LEAST_CONN=YES
+HTTP_UPSTREAM_RANDOM=YES
HTTP_UPSTREAM_KEEPALIVE=YES
HTTP_UPSTREAM_ZONE=YES
@@ -126,6 +127,7 @@ STREAM_SPLIT_CLIENTS=YES
STREAM_RETURN=YES
STREAM_UPSTREAM_HASH=YES
STREAM_UPSTREAM_LEAST_CONN=YES
+STREAM_UPSTREAM_RANDOM=YES
STREAM_UPSTREAM_ZONE=YES
STREAM_SSL_PREREAD=NO
@@ -273,6 +275,8 @@ $0: warning: the \"--with-ipv6\" option is deprecated"
--without-http_upstream_ip_hash_module) HTTP_UPSTREAM_IP_HASH=NO ;;
--without-http_upstream_least_conn_module)
HTTP_UPSTREAM_LEAST_CONN=NO ;;
+ --without-http_upstream_random_module)
+ HTTP_UPSTREAM_RANDOM=NO ;;
--without-http_upstream_keepalive_module) HTTP_UPSTREAM_KEEPALIVE=NO ;;
--without-http_upstream_zone_module) HTTP_UPSTREAM_ZONE=NO ;;
@@ -325,6 +329,8 @@ use the \"--with-mail_ssl_module\" option instead"
STREAM_UPSTREAM_HASH=NO ;;
--without-stream_upstream_least_conn_module)
STREAM_UPSTREAM_LEAST_CONN=NO ;;
+ --without-stream_upstream_random_module)
+ STREAM_UPSTREAM_RANDOM=NO ;;
--without-stream_upstream_zone_module)
STREAM_UPSTREAM_ZONE=NO ;;
@@ -485,6 +491,8 @@ cat << END
disable ngx_http_upstream_ip_hash_module
--without-http_upstream_least_conn_module
disable ngx_http_upstream_least_conn_module
+ --without-http_upstream_random_module
+ disable ngx_http_upstream_random_module
--without-http_upstream_keepalive_module
disable ngx_http_upstream_keepalive_module
--without-http_upstream_zone_module
@@ -535,6 +543,8 @@ cat << END
disable ngx_stream_upstream_hash_module
--without-stream_upstream_least_conn_module
disable ngx_stream_upstream_least_conn_module
+ --without-stream_upstream_random_module
+ disable ngx_stream_upstream_random_module
--without-stream_upstream_zone_module
disable ngx_stream_upstream_zone_module
diff --git a/auto/os/linux b/auto/os/linux
index 2c8a9bb..5e280ec 100644
--- a/auto/os/linux
+++ b/auto/os/linux
@@ -185,6 +185,8 @@ ngx_feature_test="struct __user_cap_data_struct data;
data.effective = CAP_TO_MASK(CAP_NET_RAW);
data.permitted = 0;
+ (void) header;
+ (void) data;
(void) SYS_capset"
. auto/feature
diff --git a/auto/os/win32 b/auto/os/win32
index 7a82774..b821ae6 100644
--- a/auto/os/win32
+++ b/auto/os/win32
@@ -11,6 +11,7 @@ CORE_SRCS="$WIN32_SRCS $IOCP_SRCS"
OS_CONFIG="$WIN32_CONFIG"
NGX_ICONS="$NGX_WIN32_ICONS"
SELECT_SRCS=$WIN32_SELECT_SRCS
+POLL_SRCS=$WIN32_POLL_SRCS
ngx_pic_opt=
ngx_binext=".exe"
@@ -31,12 +32,7 @@ case "$NGX_CC_NAME" in
esac
EVENT_MODULES="$EVENT_MODULES $IOCP_MODULE"
-EVENT_FOUND=YES
-
-if [ $EVENT_SELECT = NO ]; then
- CORE_SRCS="$CORE_SRCS $SELECT_SRCS"
- EVENT_MODULES="$EVENT_MODULES $SELECT_MODULE"
-fi
+#EVENT_FOUND=YES
have=NGX_HAVE_INET6 . auto/have
diff --git a/auto/sources b/auto/sources
index 1398147..3dad111 100644
--- a/auto/sources
+++ b/auto/sources
@@ -95,6 +95,7 @@ EVENT_SRCS="src/event/ngx_event.c \
src/event/ngx_event_timer.c \
src/event/ngx_event_posted.c \
src/event/ngx_event_accept.c \
+ src/event/ngx_event_udp.c \
src/event/ngx_event_connect.c \
src/event/ngx_event_pipe.c"
@@ -105,6 +106,7 @@ WIN32_SELECT_SRCS=src/event/modules/ngx_win32_select_module.c
POLL_MODULE=ngx_poll_module
POLL_SRCS=src/event/modules/ngx_poll_module.c
+WIN32_POLL_SRCS=src/event/modules/ngx_win32_poll_module.c
KQUEUE_MODULE=ngx_kqueue_module
KQUEUE_SRCS=src/event/modules/ngx_kqueue_module.c
diff --git a/conf/mime.types b/conf/mime.types
index 8a2348a..2961256 100644
--- a/conf/mime.types
+++ b/conf/mime.types
@@ -24,7 +24,9 @@ types {
image/x-jng jng;
image/x-ms-bmp bmp;
- application/font-woff woff;
+ font/woff woff;
+ font/woff2 woff2;
+
application/java-archive jar war ear;
application/json json;
application/mac-binhex40 hqx;
diff --git a/contrib/vim/syntax/nginx.vim b/contrib/vim/syntax/nginx.vim
index 075b19a..6bee7a2 100644
--- a/contrib/vim/syntax/nginx.vim
+++ b/contrib/vim/syntax/nginx.vim
@@ -108,6 +108,7 @@ syn keyword ngxDirectiveControl contained set
syn keyword ngxDirectiveError contained error_page
syn keyword ngxDirectiveError contained post_action
+syn keyword ngxDirectiveDeprecated contained limit_zone
syn keyword ngxDirectiveDeprecated contained proxy_downstream_buffer
syn keyword ngxDirectiveDeprecated contained proxy_upstream_buffer
syn keyword ngxDirectiveDeprecated contained spdy_chunk_size
@@ -118,6 +119,7 @@ syn keyword ngxDirectiveDeprecated contained spdy_pool_size
syn keyword ngxDirectiveDeprecated contained spdy_recv_buffer_size
syn keyword ngxDirectiveDeprecated contained spdy_recv_timeout
syn keyword ngxDirectiveDeprecated contained spdy_streams_index_size
+syn keyword ngxDirectiveDeprecated contained ssl
syn keyword ngxDirectiveDeprecated contained upstream_conf
syn keyword ngxDirective contained absolute_redirect
@@ -136,6 +138,7 @@ syn keyword ngxDirective contained alias
syn keyword ngxDirective contained allow
syn keyword ngxDirective contained ancient_browser
syn keyword ngxDirective contained ancient_browser_value
+syn keyword ngxDirective contained api
syn keyword ngxDirective contained auth_basic
syn keyword ngxDirective contained auth_basic_user_file
syn keyword ngxDirective contained auth_http
@@ -143,7 +146,11 @@ syn keyword ngxDirective contained auth_http_header
syn keyword ngxDirective contained auth_http_pass_client_cert
syn keyword ngxDirective contained auth_http_timeout
syn keyword ngxDirective contained auth_jwt
+syn keyword ngxDirective contained auth_jwt_claim_set
+syn keyword ngxDirective contained auth_jwt_header_set
syn keyword ngxDirective contained auth_jwt_key_file
+syn keyword ngxDirective contained auth_jwt_key_request
+syn keyword ngxDirective contained auth_jwt_leeway
syn keyword ngxDirective contained auth_request
syn keyword ngxDirective contained auth_request_set
syn keyword ngxDirective contained autoindex
@@ -229,6 +236,7 @@ syn keyword ngxDirective contained fastcgi_read_timeout
syn keyword ngxDirective contained fastcgi_request_buffering
syn keyword ngxDirective contained fastcgi_send_lowat
syn keyword ngxDirective contained fastcgi_send_timeout
+syn keyword ngxDirective contained fastcgi_socket_keepalive
syn keyword ngxDirective contained fastcgi_split_path_info
syn keyword ngxDirective contained fastcgi_store
syn keyword ngxDirective contained fastcgi_store_access
@@ -255,6 +263,7 @@ syn keyword ngxDirective contained grpc_pass_header
syn keyword ngxDirective contained grpc_read_timeout
syn keyword ngxDirective contained grpc_send_timeout
syn keyword ngxDirective contained grpc_set_header
+syn keyword ngxDirective contained grpc_socket_keepalive
syn keyword ngxDirective contained grpc_ssl_certificate
syn keyword ngxDirective contained grpc_ssl_certificate_key
syn keyword ngxDirective contained grpc_ssl_ciphers
@@ -330,6 +339,8 @@ syn keyword ngxDirective contained keepalive
syn keyword ngxDirective contained keepalive_disable
syn keyword ngxDirective contained keepalive_requests
syn keyword ngxDirective contained keepalive_timeout
+syn keyword ngxDirective contained keyval
+syn keyword ngxDirective contained keyval_zone
syn keyword ngxDirective contained kqueue_changes
syn keyword ngxDirective contained kqueue_events
syn keyword ngxDirective contained large_client_header_buffers
@@ -367,6 +378,7 @@ syn keyword ngxDirective contained memcached_next_upstream_timeout
syn keyword ngxDirective contained memcached_next_upstream_tries
syn keyword ngxDirective contained memcached_read_timeout
syn keyword ngxDirective contained memcached_send_timeout
+syn keyword ngxDirective contained memcached_socket_keepalive
syn keyword ngxDirective contained merge_slashes
syn keyword ngxDirective contained min_delete_depth
syn keyword ngxDirective contained mirror
@@ -375,9 +387,9 @@ syn keyword ngxDirective contained modern_browser
syn keyword ngxDirective contained modern_browser_value
syn keyword ngxDirective contained mp4
syn keyword ngxDirective contained mp4_buffer_size
-syn keyword ngxDirective contained mp4_max_buffer_size
syn keyword ngxDirective contained mp4_limit_rate
syn keyword ngxDirective contained mp4_limit_rate_after
+syn keyword ngxDirective contained mp4_max_buffer_size
syn keyword ngxDirective contained msie_padding
syn keyword ngxDirective contained msie_refresh
syn keyword ngxDirective contained multi_accept
@@ -456,11 +468,13 @@ syn keyword ngxDirective contained proxy_protocol_timeout
syn keyword ngxDirective contained proxy_read_timeout
syn keyword ngxDirective contained proxy_redirect
syn keyword ngxDirective contained proxy_request_buffering
+syn keyword ngxDirective contained proxy_requests
syn keyword ngxDirective contained proxy_responses
syn keyword ngxDirective contained proxy_send_lowat
syn keyword ngxDirective contained proxy_send_timeout
syn keyword ngxDirective contained proxy_set_body
syn keyword ngxDirective contained proxy_set_header
+syn keyword ngxDirective contained proxy_socket_keepalive
syn keyword ngxDirective contained proxy_ssl
syn keyword ngxDirective contained proxy_ssl_certificate
syn keyword ngxDirective contained proxy_ssl_certificate_key
@@ -481,6 +495,7 @@ syn keyword ngxDirective contained proxy_temp_path
syn keyword ngxDirective contained proxy_timeout
syn keyword ngxDirective contained proxy_upload_rate
syn keyword ngxDirective contained queue
+syn keyword ngxDirective contained random
syn keyword ngxDirective contained random_index
syn keyword ngxDirective contained read_ahead
syn keyword ngxDirective contained real_ip_header
@@ -533,6 +548,7 @@ syn keyword ngxDirective contained scgi_pass_request_headers
syn keyword ngxDirective contained scgi_read_timeout
syn keyword ngxDirective contained scgi_request_buffering
syn keyword ngxDirective contained scgi_send_timeout
+syn keyword ngxDirective contained scgi_socket_keepalive
syn keyword ngxDirective contained scgi_store
syn keyword ngxDirective contained scgi_store_access
syn keyword ngxDirective contained scgi_temp_file_write_size
@@ -565,7 +581,6 @@ syn keyword ngxDirective contained ssi_min_file_chunk
syn keyword ngxDirective contained ssi_silent_errors
syn keyword ngxDirective contained ssi_types
syn keyword ngxDirective contained ssi_value_length
-syn keyword ngxDirective contained ssl
syn keyword ngxDirective contained ssl_buffer_size
syn keyword ngxDirective contained ssl_certificate
syn keyword ngxDirective contained ssl_certificate_key
@@ -573,6 +588,7 @@ syn keyword ngxDirective contained ssl_ciphers
syn keyword ngxDirective contained ssl_client_certificate
syn keyword ngxDirective contained ssl_crl
syn keyword ngxDirective contained ssl_dhparam
+syn keyword ngxDirective contained ssl_early_data
syn keyword ngxDirective contained ssl_ecdh_curve
syn keyword ngxDirective contained ssl_engine
syn keyword ngxDirective contained ssl_handshake_timeout
@@ -664,6 +680,7 @@ syn keyword ngxDirective contained uwsgi_pass_request_headers
syn keyword ngxDirective contained uwsgi_read_timeout
syn keyword ngxDirective contained uwsgi_request_buffering
syn keyword ngxDirective contained uwsgi_send_timeout
+syn keyword ngxDirective contained uwsgi_socket_keepalive
syn keyword ngxDirective contained uwsgi_ssl_certificate
syn keyword ngxDirective contained uwsgi_ssl_certificate_key
syn keyword ngxDirective contained uwsgi_ssl_ciphers
@@ -701,6 +718,26 @@ syn keyword ngxDirective contained xslt_string_param
syn keyword ngxDirective contained xslt_stylesheet
syn keyword ngxDirective contained xslt_types
syn keyword ngxDirective contained zone
+syn keyword ngxDirective contained zone_sync
+syn keyword ngxDirective contained zone_sync_buffers
+syn keyword ngxDirective contained zone_sync_connect_retry_interval
+syn keyword ngxDirective contained zone_sync_connect_timeout
+syn keyword ngxDirective contained zone_sync_interval
+syn keyword ngxDirective contained zone_sync_recv_buffer_size
+syn keyword ngxDirective contained zone_sync_server
+syn keyword ngxDirective contained zone_sync_ssl
+syn keyword ngxDirective contained zone_sync_ssl_certificate
+syn keyword ngxDirective contained zone_sync_ssl_certificate_key
+syn keyword ngxDirective contained zone_sync_ssl_ciphers
+syn keyword ngxDirective contained zone_sync_ssl_crl
+syn keyword ngxDirective contained zone_sync_ssl_name
+syn keyword ngxDirective contained zone_sync_ssl_password_file
+syn keyword ngxDirective contained zone_sync_ssl_protocols
+syn keyword ngxDirective contained zone_sync_ssl_server_name
+syn keyword ngxDirective contained zone_sync_ssl_trusted_certificate
+syn keyword ngxDirective contained zone_sync_ssl_verify
+syn keyword ngxDirective contained zone_sync_ssl_verify_depth
+syn keyword ngxDirective contained zone_sync_timeout
" 3rd party modules list taken from
" https://github.com/freebsd/freebsd-ports/blob/master/www/nginx-devel/Makefile
@@ -876,6 +913,8 @@ syn keyword ngxDirectiveThirdParty contained more_set_input_headers
" NGINX WebDAV missing commands support (PROPFIND & OPTIONS)
" https://github.com/arut/nginx-dav-ext-module
+syn keyword ngxDirectiveThirdParty contained dav_ext_lock
+syn keyword ngxDirectiveThirdParty contained dav_ext_lock_zone
syn keyword ngxDirectiveThirdParty contained dav_ext_methods
" ngx_eval
@@ -895,6 +934,7 @@ syn keyword ngxDirectiveThirdParty contained fancyindex_directories_first
syn keyword ngxDirectiveThirdParty contained fancyindex_exact_size
syn keyword ngxDirectiveThirdParty contained fancyindex_footer
syn keyword ngxDirectiveThirdParty contained fancyindex_header
+syn keyword ngxDirectiveThirdParty contained fancyindex_hide_parent_dir
syn keyword ngxDirectiveThirdParty contained fancyindex_hide_symlinks
syn keyword ngxDirectiveThirdParty contained fancyindex_ignore
syn keyword ngxDirectiveThirdParty contained fancyindex_localtime
@@ -937,8 +977,17 @@ syn keyword ngxDirectiveThirdParty contained notice_type
" nchan
" https://github.com/slact/nchan
+syn keyword ngxDirectiveThirdParty contained nchan_access_control_allow_credentials
syn keyword ngxDirectiveThirdParty contained nchan_access_control_allow_origin
syn keyword ngxDirectiveThirdParty contained nchan_authorize_request
+syn keyword ngxDirectiveThirdParty contained nchan_benchmark
+syn keyword ngxDirectiveThirdParty contained nchan_benchmark_channels
+syn keyword ngxDirectiveThirdParty contained nchan_benchmark_message_padding_bytes
+syn keyword ngxDirectiveThirdParty contained nchan_benchmark_messages_per_channel_per_minute
+syn keyword ngxDirectiveThirdParty contained nchan_benchmark_publisher_distribution
+syn keyword ngxDirectiveThirdParty contained nchan_benchmark_subscriber_distribution
+syn keyword ngxDirectiveThirdParty contained nchan_benchmark_subscribers_per_channel
+syn keyword ngxDirectiveThirdParty contained nchan_benchmark_time
syn keyword ngxDirectiveThirdParty contained nchan_channel_event_string
syn keyword ngxDirectiveThirdParty contained nchan_channel_events_channel_id
syn keyword ngxDirectiveThirdParty contained nchan_channel_group
@@ -974,15 +1023,19 @@ syn keyword ngxDirectiveThirdParty contained nchan_publisher_upstream_request
syn keyword ngxDirectiveThirdParty contained nchan_pubsub
syn keyword ngxDirectiveThirdParty contained nchan_pubsub_channel_id
syn keyword ngxDirectiveThirdParty contained nchan_pubsub_location
+syn keyword ngxDirectiveThirdParty contained nchan_redis_connect_timeout
syn keyword ngxDirectiveThirdParty contained nchan_redis_fakesub_timer_interval
syn keyword ngxDirectiveThirdParty contained nchan_redis_idle_channel_cache_timeout
syn keyword ngxDirectiveThirdParty contained nchan_redis_namespace
+syn keyword ngxDirectiveThirdParty contained nchan_redis_nostore_fastpublish
+syn keyword ngxDirectiveThirdParty contained nchan_redis_optimize_target
syn keyword ngxDirectiveThirdParty contained nchan_redis_pass
syn keyword ngxDirectiveThirdParty contained nchan_redis_pass_inheritable
syn keyword ngxDirectiveThirdParty contained nchan_redis_ping_interval
syn keyword ngxDirectiveThirdParty contained nchan_redis_publish_msgpacked_max_size
syn keyword ngxDirectiveThirdParty contained nchan_redis_server
syn keyword ngxDirectiveThirdParty contained nchan_redis_storage_mode
+syn keyword ngxDirectiveThirdParty contained nchan_redis_subscribe_weights
syn keyword ngxDirectiveThirdParty contained nchan_redis_url
syn keyword ngxDirectiveThirdParty contained nchan_redis_wait_after_connecting
syn keyword ngxDirectiveThirdParty contained nchan_shared_memory_size
@@ -1280,6 +1333,7 @@ syn keyword ngxDirectiveThirdParty contained lua_package_cpath
syn keyword ngxDirectiveThirdParty contained lua_package_path
syn keyword ngxDirectiveThirdParty contained lua_regex_cache_max_entries
syn keyword ngxDirectiveThirdParty contained lua_regex_match_limit
+syn keyword ngxDirectiveThirdParty contained lua_sa_restart
syn keyword ngxDirectiveThirdParty contained lua_shared_dict
syn keyword ngxDirectiveThirdParty contained lua_socket_buffer_size
syn keyword ngxDirectiveThirdParty contained lua_socket_connect_timeout
@@ -1355,9 +1409,15 @@ syn keyword ngxDirectiveThirdParty contained rules_enabled
" https://www.phusionpassenger.com/library/config/nginx/reference/
syn keyword ngxDirectiveThirdParty contained passenger_abort_on_startup_error
syn keyword ngxDirectiveThirdParty contained passenger_abort_websockets_on_process_shutdown
+syn keyword ngxDirectiveThirdParty contained passenger_admin_panel_auth_type
+syn keyword ngxDirectiveThirdParty contained passenger_admin_panel_password
+syn keyword ngxDirectiveThirdParty contained passenger_admin_panel_url
+syn keyword ngxDirectiveThirdParty contained passenger_admin_panel_username
+syn keyword ngxDirectiveThirdParty contained passenger_anonymous_telemetry_proxy
syn keyword ngxDirectiveThirdParty contained passenger_app_env
syn keyword ngxDirectiveThirdParty contained passenger_app_file_descriptor_ulimit
syn keyword ngxDirectiveThirdParty contained passenger_app_group_name
+syn keyword ngxDirectiveThirdParty contained passenger_app_log_file
syn keyword ngxDirectiveThirdParty contained passenger_app_rights
syn keyword ngxDirectiveThirdParty contained passenger_app_root
syn keyword ngxDirectiveThirdParty contained passenger_app_type
@@ -1373,8 +1433,10 @@ syn keyword ngxDirectiveThirdParty contained passenger_data_buffer_dir
syn keyword ngxDirectiveThirdParty contained passenger_debugger
syn keyword ngxDirectiveThirdParty contained passenger_default_group
syn keyword ngxDirectiveThirdParty contained passenger_default_user
+syn keyword ngxDirectiveThirdParty contained passenger_disable_anonymous_telemetry
syn keyword ngxDirectiveThirdParty contained passenger_disable_security_update_check
syn keyword ngxDirectiveThirdParty contained passenger_document_root
+syn keyword ngxDirectiveThirdParty contained passenger_dump_config_manifest
syn keyword ngxDirectiveThirdParty contained passenger_enabled
syn keyword ngxDirectiveThirdParty contained passenger_env_var
syn keyword ngxDirectiveThirdParty contained passenger_file_descriptor_log_file
@@ -1402,6 +1464,7 @@ syn keyword ngxDirectiveThirdParty contained passenger_max_requests
syn keyword ngxDirectiveThirdParty contained passenger_memory_limit
syn keyword ngxDirectiveThirdParty contained passenger_meteor_app_settings
syn keyword ngxDirectiveThirdParty contained passenger_min_instances
+syn keyword ngxDirectiveThirdParty contained passenger_monitor_log_file
syn keyword ngxDirectiveThirdParty contained passenger_nodejs
syn keyword ngxDirectiveThirdParty contained passenger_pass_header
syn keyword ngxDirectiveThirdParty contained passenger_pool_idle_time
@@ -1778,6 +1841,8 @@ syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_filter
syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_filter_by_host
syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_filter_by_set_key
syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_filter_check_duplicate
+syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_filter_max_node
+syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_histogram_buckets
syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_limit
syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_limit_check_duplicate
syn keyword ngxDirectiveThirdParty contained vhost_traffic_status_limit_traffic
@@ -1899,11 +1964,11 @@ syn keyword ngxDirectiveThirdParty contained form_auth_remote_user
" ngx_http_accounting_module
" https://github.com/Lax/ngx_http_accounting_module
-syn keyword ngxDirectiveThirdParty contained http_accounting
-syn keyword ngxDirectiveThirdParty contained http_accounting_id
-syn keyword ngxDirectiveThirdParty contained http_accounting_interval
-syn keyword ngxDirectiveThirdParty contained http_accounting_log
-syn keyword ngxDirectiveThirdParty contained http_accounting_perturb
+syn keyword ngxDirectiveThirdParty contained accounting
+syn keyword ngxDirectiveThirdParty contained accounting_id
+syn keyword ngxDirectiveThirdParty contained accounting_interval
+syn keyword ngxDirectiveThirdParty contained accounting_log
+syn keyword ngxDirectiveThirdParty contained accounting_perturb
" concatenating files in a given context: CSS and JS files usually
" https://github.com/alibaba/nginx-http-concat
diff --git a/html/50x.html b/html/50x.html
index f60f5e7..9071e0a 100644
--- a/html/50x.html
+++ b/html/50x.html
@@ -15,7 +15,7 @@
Sorry, the page you are looking for is currently unavailable.
Please try again later.
If you are the system administrator of this resource then you should check
-the error log for details.
+the error log for details.
Faithfully yours, nginx.