linux/net
Anant Thazhemadam 229bdf0b13 net: 9p: initialize sun_server.sun_path to have addr's value only when addr is valid
[ Upstream commit 7ca1db21ef ]

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/20201012042404.2508-1-anant.thazhemadam@gmail.com
Reported-by: syzbot+75d51fe5bf4ebe988518@syzkaller.appspotmail.com
Tested-by: syzbot+75d51fe5bf4ebe988518@syzkaller.appspotmail.com
Signed-off-by: Anant Thazhemadam <anant.thazhemadam@gmail.com>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-11-05 11:43:20 +01:00
..
6lowpan
9p 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
802
8021q
appletalk
atm atm: fix a memory leak of vcc->user_back 2020-10-01 13:17:58 +02:00
ax25
batman-adv batman-adv: mcast: fix duplicate mcast packets from BLA backbone to mesh 2020-10-01 13:18:19 +02:00
bluetooth Bluetooth: Only mark socket zapped after unlocking 2020-10-29 09:58:06 +01:00
bpf
bpfilter
bridge netfilter: ebtables: Fixes dropping of small packets in bridge nat 2020-10-29 09:57:57 +01:00
caif
can net: j1939: j1939_session_fresh_new(): fix missing initialization of skbcnt 2020-10-29 09:57:24 +01:00
ceph
core socket: don't clear SOCK_TSTAMP_NEW when SO_TIMESTAMPNS is disabled 2020-11-01 12:01:01 +01:00
dcb
dccp
decnet
dns_resolver
dsa
ethernet
hsr
ieee802154
ife
ipv4 tcp: Prevent low rmem stalls with SO_RCVLOWAT. 2020-11-01 12:01:04 +01:00
ipv6 netfilter: nf_log: missing vlan offload tag and proto 2020-10-29 09:57:45 +01:00
iucv
kcm
key
l2tp
l3mdev
lapb
llc
mac80211 mac80211: handle lack of sband->bitrates in rates 2020-10-29 09:58:04 +01:00
mac802154 mac802154: tx: fix use-after-free 2020-10-01 13:18:17 +02:00
mpls
ncsi
netfilter netfilter: nftables_offload: KASAN slab-out-of-bounds Read in nft_flow_rule_create 2020-11-01 12:01:01 +01:00
netlabel
netlink
netrom
nfc nfc: Ensure presence of NFC_ATTR_FIRMWARE_NAME attribute in nfc_genl_fw_download() 2020-10-29 09:57:26 +01:00
nsh
openvswitch openvswitch: handle DNAT tuple collision 2020-10-14 10:33:02 +02:00
packet
phonet
psample
qrtr
rds
rfkill
rose
rxrpc rxrpc: Fix server keyring leak 2020-10-14 10:33:05 +02:00
sched net/sched: act_mpls: Add softdep on mpls_gso.ko 2020-11-01 12:01:03 +01:00
sctp sctp: fix sctp_auth_init_hmacs() error path 2020-10-14 10:33:01 +02:00
smc net/smc: fix valid DMBE buffer sizes 2020-10-29 09:57:23 +01:00
strparser
sunrpc SUNRPC: Mitigate cond_resched() in xprt_transmit() 2020-11-05 11:43:18 +01:00
switchdev
tipc tipc: fix memory leak caused by tipc_buf_append() 2020-11-01 12:01:04 +01:00
tls net/tls: sendfile fails with ktls offload 2020-10-29 09:57:23 +01:00
unix
vmw_vsock net: virtio_vsock: Enhance connection semantics 2020-10-07 08:01:24 +02:00
wimax
wireless nl80211: fix non-split wiphy information 2020-10-29 09:57:44 +01:00
x25
xdp
xfrm xfrm: Use correct address family in xfrm_state_find 2020-10-14 10:33:03 +02:00
Kconfig
Makefile
compat.c
socket.c
sysctl_net.c