android_kernel_oneplus_msm8998/net/unix
Mateusz Jurczyk 0fc0fad077 af_unix: Add sockaddr length checks before accessing sa_family in bind and connect handlers
[ Upstream commit defbcf2decc903a28d8398aa477b6881e711e3ea ]

Verify that the caller-provided sockaddr structure is large enough to
contain the sa_family field, before accessing it in bind() and connect()
handlers of the AF_UNIX socket. Since neither syscall enforces a minimum
size of the corresponding memory region, very short sockaddrs (zero or
one byte long) result in operating on uninitialized memory while
referencing .sa_family.

Signed-off-by: Mateusz Jurczyk <mjurczyk@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-05 14:37:13 +02:00
..
af_unix.c af_unix: Add sockaddr length checks before accessing sa_family in bind and connect handlers 2017-07-05 14:37:13 +02:00
diag.c
garbage.c net: unix: properly re-increment inflight counter of GC discarded candidates 2017-03-30 09:35:13 +02:00
Kconfig
Makefile
sysctl_net_unix.c