view src/os/win32/nginx_icon32.xpm @ 7119:fef61d26da39

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).
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 04 Oct 2017 21:19:33 +0300
parents 7e24168b0853
children
line wrap: on
line source

/* XPM */
static char * nginx_xpm[] = {
"32 32 2 2",
/* colors */
"   c none",
"GG c #009900",
/* pixels */
"                                                                ",
"                                                                ",
"                                                                ",
"                                                                ",
"                  GGGGGGGGGGGGGGGGGGGGGGGGGGGG                  ",
"                GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG                ",
"                GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG                ",
"              GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG              ",
"              GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG              ",
"            GGGGGGGGGG                    GGGGGGGGGG            ",
"            GGGGGGGGGG                    GGGGGGGGGG            ",
"          GGGGGGGGGG                        GGGGGGGGGG          ",
"          GGGGGGGGGG                        GGGGGGGGGG          ",
"        GGGGGGGGGG                                              ",
"        GGGGGGGGGG                                              ",
"      GGGGGGGGGG            GGGGGGGGGGGGGGGGGGGGGGGGGGGGGG      ",
"      GGGGGGGGGG          GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG      ",
"        GGGGGGGGGG        GGGGGGGGGGGGGGGGGGGGGGGGGGGGGG        ",
"        GGGGGGGGGG        GGGGGGGGGGGGGGGGGGGGGGGGGGGGGG        ",
"          GGGGGGGGGG        GGGGGGGGGGGGGGGGGGGGGGGGGG          ",
"          GGGGGGGGGG                        GGGGGGGGGG          ",
"            GGGGGGGGGG                    GGGGGGGGGG            ",
"            GGGGGGGGGG                    GGGGGGGGGG            ",
"              GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG              ",
"              GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG              ",
"                GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG                ",
"                GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG                ",
"                  GGGGGGGGGGGGGGGGGGGGGGGGGGGG                  ",
"                                                                ",
"                                                                ",
"                                                                ",
"                                                                "