lineage_android_kernel_xiao.../net/nfc
Mateusz Jurczyk 244a7db0e9 NFC: Add sockaddr length checks before accessing sa_family in bind handlers
commit f6a5885fc4d68e7f25ffb42b9d8d80aebb3bacbb upstream.

Verify that the caller-provided sockaddr structure is large enough to
contain the sa_family field, before accessing it in bind() handlers of the
AF_NFC socket. Since the syscall doesn't enforce 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: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-27 15:07:56 -07:00
..
hci
nci NFC: fix broken device allocation 2017-07-27 15:07:56 -07:00
Kconfig
Makefile
af_nfc.c
core.c NFC: fix broken device allocation 2017-07-27 15:07:56 -07:00
digital.h
digital_core.c
digital_dep.c
digital_technology.c
llcp.h
llcp_commands.c
llcp_core.c
llcp_sock.c NFC: Add sockaddr length checks before accessing sa_family in bind handlers 2017-07-27 15:07:56 -07:00
netlink.c nfc: Ensure presence of required attributes in the activate_target handler 2017-07-27 15:07:56 -07:00
nfc.h
rawsock.c