android_kernel_samsung_msm8226/net/iucv
Mateusz Jurczyk 4b359f8f68 af_iucv: Move sockaddr length checks to before accessing sa_family in bind and connect handlers
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_IUCV 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.

Change-Id: Ia152d4c51a13705c6a41a0b2456a156d838acc86
Fixes: 52a82e23b9f2 ("af_iucv: Validate socket address length in iucv_sock_bind()")
Signed-off-by: Mateusz Jurczyk <mjurczyk@google.com>
[jwi: removed unneeded null-check for addr]
Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
2019-08-08 12:09:30 +02:00
..
Kconfig iucv: kernel option for z/VM IUCV and HiperSockets 2011-08-13 01:10:16 -07:00
Makefile
af_iucv.c af_iucv: Move sockaddr length checks to before accessing sa_family in bind and connect handlers 2019-08-08 12:09:30 +02:00
iucv.c [S390] irq: external interrupt code passing 2012-03-11 11:59:29 -04:00