No description
Find a file
Maxim Dounin 2a66bbf13d Fixed buffer overread with unix sockets after accept().
Some OSes (notably macOS, NetBSD, and Solaris) allow unix socket addresses
larger than struct sockaddr_un.  Moreover, some of them (macOS, Solaris)
return socklen of the socket address before it was truncated to fit the
buffer provided.  As such, on these systems socklen must not be used without
additional check that it is within the buffer provided.

Appropriate checks added to ngx_event_accept() (after accept()),
ngx_event_recvmsg() (after recvmsg()), and ngx_set_inherited_sockets()
(after getsockname()).

We also obtain socket addresses via getsockname() in
ngx_connection_local_sockaddr(), but it does not need any checks as
it is only used for INET and INET6 sockets (as there can be no
wildcard unix sockets).
2017-10-04 21:19:33 +03:00
auto Configure: fixed --without_http. 2017-03-16 20:38:31 +03:00
conf Added the REQUEST_SCHEME parameter. 2015-06-05 22:23:26 +03:00
contrib Contrib: vim syntax, update 3rd party module directives. 2017-03-01 23:41:39 +08:00
docs nginx-1.12.1-RELEASE 2017-07-11 16:24:04 +03:00
misc Updated PCRE used for win32 builds. 2017-08-08 15:21:10 +03:00
src Fixed buffer overread with unix sockets after accept(). 2017-10-04 21:19:33 +03:00