android_kernel_motorola_sm6375/net/9p
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Anant Thazhemadam 229bdf0b13 net: 9p: initialize sun_server.sun_path to have addr's value only when addr is valid
[ Upstream commit 7ca1db21ef8e0e6725b4d25deed1ca196f7efb28 ]

In p9_fd_create_unix, checking is performed to see if the addr (passed
as an argument) is NULL or not.
However, no check is performed to see if addr is a valid address, i.e.,
it doesn't entirely consist of only 0's.
The initialization of sun_server.sun_path to be equal to this faulty
addr value leads to an uninitialized variable, as detected by KMSAN.
Checking for this (faulty addr) and returning a negative error number
appropriately, resolves this issue.

Link: http://lkml.kernel.org/r/[email protected]
Reported-by: [email protected]
Tested-by: [email protected]
Signed-off-by: Anant Thazhemadam <[email protected]>
Signed-off-by: Dominique Martinet <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2020-11-05 11:43:20 +01:00
..
client.c
error.c
Kconfig
Makefile
mod.c
protocol.c
protocol.h
trans_common.c
trans_common.h
trans_fd.c net: 9p: initialize sun_server.sun_path to have addr's value only when addr is valid 2020-11-05 11:43:20 +01:00
trans_rdma.c
trans_virtio.c
trans_xen.c