<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nginx.git/src/http, branch release-1.11.3</title>
<subtitle>nginx</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/'/>
<entry>
<title>Fixed regex captures handling without PCRE.</title>
<updated>2016-07-06T11:33:40+00:00</updated>
<author>
<name>Vladimir Homutov</name>
<email>vl@nginx.com</email>
</author>
<published>2016-07-06T11:33:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=161fcf4bddca789b15dcf22b1e1d80cdabc24114'/>
<id>161fcf4bddca789b15dcf22b1e1d80cdabc24114</id>
<content type='text'>
If PCRE is disabled, captures were treated as normal variables in
ngx_http_script_compile(), while code calculating flushes array length in
ngx_http_compile_complex_value() did not account captures as variables.
This could lead to write outside of the array boundary when setting
last element to -1.

Found with AddressSanitizer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If PCRE is disabled, captures were treated as normal variables in
ngx_http_script_compile(), while code calculating flushes array length in
ngx_http_compile_complex_value() did not account captures as variables.
This could lead to write outside of the array boundary when setting
last element to -1.

Found with AddressSanitizer.
</pre>
</div>
</content>
</entry>
<entry>
<title>HTTP/2: flushing of the SSL buffer in transition to the idle state.</title>
<updated>2016-07-19T17:34:17+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2016-07-19T17:34:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=a85edfeef6cdf4094e6e12b663b7371271cb610f'/>
<id>a85edfeef6cdf4094e6e12b663b7371271cb610f</id>
<content type='text'>
It fixes potential connection leak if some unsent data was left in the SSL
buffer.  Particularly, that could happen when a client canceled the stream
after the HEADERS frame has already been created.  In this case no other
frames might be produced and the HEADERS frame alone didn't flush the buffer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It fixes potential connection leak if some unsent data was left in the SSL
buffer.  Particularly, that could happen when a client canceled the stream
after the HEADERS frame has already been created.  In this case no other
frames might be produced and the HEADERS frame alone didn't flush the buffer.
</pre>
</div>
</content>
</entry>
<entry>
<title>HTTP/2: refactored ngx_http_v2_send_output_queue().</title>
<updated>2016-07-19T17:34:02+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2016-07-19T17:34:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=3c81c08ceae2c22cf5d2ba1b637d685e397a68f2'/>
<id>3c81c08ceae2c22cf5d2ba1b637d685e397a68f2</id>
<content type='text'>
Now it returns NGX_AGAIN if there's still data to be sent.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now it returns NGX_AGAIN if there's still data to be sent.
</pre>
</div>
</content>
</entry>
<entry>
<title>HTTP/2: fixed send timer handling.</title>
<updated>2016-07-19T17:31:09+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2016-07-19T17:31:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=3b2f54bc2ea0d9d34b3e181f1221a050824e1c1a'/>
<id>3b2f54bc2ea0d9d34b3e181f1221a050824e1c1a</id>
<content type='text'>
Checking for return value of c-&gt;send_chain() isn't sufficient since there
are data can be left in the SSL buffer.  Now the wew-&gt;ready flag is used
instead.

In particular, this fixed a connection leak in cases when all streams were
closed, but there's still some data to be sent in the SSL buffer and the
client forgot about the connection.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Checking for return value of c-&gt;send_chain() isn't sufficient since there
are data can be left in the SSL buffer.  Now the wew-&gt;ready flag is used
instead.

In particular, this fixed a connection leak in cases when all streams were
closed, but there's still some data to be sent in the SSL buffer and the
client forgot about the connection.
</pre>
</div>
</content>
</entry>
<entry>
<title>HTTP/2: avoid sending output queue if there's nothing to send.</title>
<updated>2016-07-19T17:30:21+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2016-07-19T17:30:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=ce6eb33d15f1efd3c418ce7688ed6de3af81cae9'/>
<id>ce6eb33d15f1efd3c418ce7688ed6de3af81cae9</id>
<content type='text'>
Particularly this fixes alerts on OS X and NetBSD systems when HTTP/2 is
configured over plain TCP sockets.

On these systems calling writev() with no data leads to EINVAL errors
being logged as "writev() failed (22: Invalid argument) while processing
HTTP/2 connection".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Particularly this fixes alerts on OS X and NetBSD systems when HTTP/2 is
configured over plain TCP sockets.

On these systems calling writev() with no data leads to EINVAL errors
being logged as "writev() failed (22: Invalid argument) while processing
HTTP/2 connection".
</pre>
</div>
</content>
</entry>
<entry>
<title>HTTP/2: always handle streams in error state.</title>
<updated>2016-07-19T17:22:44+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2016-07-19T17:22:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=da852aa468db80f9e5138aea81a1bebb90e0be51'/>
<id>da852aa468db80f9e5138aea81a1bebb90e0be51</id>
<content type='text'>
Previously, a stream could be closed by timeout if it was canceled
while its send window was exhausted.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, a stream could be closed by timeout if it was canceled
while its send window was exhausted.
</pre>
</div>
</content>
</entry>
<entry>
<title>HTTP/2: prevented output of the HEADERS frame for canceled streams.</title>
<updated>2016-07-19T17:22:44+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2016-07-19T17:22:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=19de85a4d75e7eada6afb8f59ce6d5de0ec10d5c'/>
<id>19de85a4d75e7eada6afb8f59ce6d5de0ec10d5c</id>
<content type='text'>
It's useless to generate HEADERS if the stream has been canceled already.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's useless to generate HEADERS if the stream has been canceled already.
</pre>
</div>
</content>
</entry>
<entry>
<title>HTTP/2: always send GOAWAY while worker is shutting down.</title>
<updated>2016-07-19T17:22:44+00:00</updated>
<author>
<name>Valentin Bartenev</name>
<email>vbart@nginx.com</email>
</author>
<published>2016-07-19T17:22:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=ab5401d204f9cd638204dcabf45152e32920d021'/>
<id>ab5401d204f9cd638204dcabf45152e32920d021</id>
<content type='text'>
Previously, if the worker process exited, GOAWAY was sent to connections in
idle state, but connections with active streams were closed without GOAWAY.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, if the worker process exited, GOAWAY was sent to connections in
idle state, but connections with active streams were closed without GOAWAY.
</pre>
</div>
</content>
</entry>
<entry>
<title>HTTP/2: avoid left-shifting signed integer into the sign bit.</title>
<updated>2016-07-07T18:03:21+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2016-07-07T18:03:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=586ef968f98c379153fea0e7e80119b149380dc8'/>
<id>586ef968f98c379153fea0e7e80119b149380dc8</id>
<content type='text'>
On non-aligned platforms, properly cast argument before left-shifting it in
ngx_http_v2_parse_uint32 that is used with u_char.  Otherwise it propagates
to int to hold the value and can step over the sign bit.  Usually, on known
compilers, this results in negation.  Furthermore, a subsequent store into a
wider type, that is ngx_uint_t on 64-bit platforms, results in sign-extension.

In practice, this can be observed in debug log as a very large exclusive bit
value, when client sent PRIORITY frame with exclusive bit set:

: *14 http2 PRIORITY frame sid:5 on 1 excl:8589934591 weight:17

Found with UndefinedBehaviorSanitizer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On non-aligned platforms, properly cast argument before left-shifting it in
ngx_http_v2_parse_uint32 that is used with u_char.  Otherwise it propagates
to int to hold the value and can step over the sign bit.  Usually, on known
compilers, this results in negation.  Furthermore, a subsequent store into a
wider type, that is ngx_uint_t on 64-bit platforms, results in sign-extension.

In practice, this can be observed in debug log as a very large exclusive bit
value, when client sent PRIORITY frame with exclusive bit set:

: *14 http2 PRIORITY frame sid:5 on 1 excl:8589934591 weight:17

Found with UndefinedBehaviorSanitizer.
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid left-shifting integers into the sign bit, which is undefined.</title>
<updated>2016-07-07T18:02:28+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2016-07-07T18:02:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=6299f5e9149483251bbbcc8ad26cf29b6109e75c'/>
<id>6299f5e9149483251bbbcc8ad26cf29b6109e75c</id>
<content type='text'>
Found with UndefinedBehaviorSanitizer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Found with UndefinedBehaviorSanitizer.
</pre>
</div>
</content>
</entry>
</feed>
