The official NGINX Open Source repository.
Go to file
Sergey Kandaurov 1a8ef991d9 Variables: avoid possible buffer overrun with some "$sent_http_*".
The existing logic to evaluate multi header "$sent_http_*" variables,
such as $sent_http_cache_control, as previously introduced in 1.23.0,
doesn't take into account that one or more elements can be cleared,
yet still present in a linked list, pointed to by the next field.
Such elements don't contribute to the resulting variable length, an
attempt to append a separator for them ends up in out of bounds write.

This is not possible with standard modules, though at least one third
party module is known to override multi header values this way, so it
makes sense to harden the logic.

The fix restores a generic boundary check.
2023-05-01 19:16:05 +04:00
auto Win32: OpenSSL compilation for x64 targets with MSVC. 2023-02-23 18:16:08 +03:00
conf MIME: added image/avif type. 2021-10-25 20:49:15 +03:00
contrib Contrib: vim syntax, update core and 3rd party module directives. 2022-06-18 15:54:40 +03:00
docs Year 2023. 2023-04-17 14:07:59 +04:00
misc Added stream modules realip and ssl_preread to win32 builds. 2023-04-17 14:08:00 +04:00
src Variables: avoid possible buffer overrun with some "$sent_http_*". 2023-05-01 19:16:05 +04:00
.hgtags release-1.23.4 tag 2023-03-28 18:01:54 +03:00