diff options
author | Anant Thazhemadam <anant.thazhemadam@gmail.com> | 2020-10-12 09:54:04 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-05 11:08:44 +0100 |
commit | 9d5fa0ad46e7882bbf89cf40d57241de3307f380 (patch) | |
tree | cd79701ee7f1af4109f69f460b36852a72343503 /arch/um/Makefile | |
parent | 1712a5d8dc9105f98bd15b78a1d996c3c113c212 (diff) | |
download | linux-stable-9d5fa0ad46e7882bbf89cf40d57241de3307f380.tar.gz linux-stable-9d5fa0ad46e7882bbf89cf40d57241de3307f380.tar.bz2 linux-stable-9d5fa0ad46e7882bbf89cf40d57241de3307f380.zip |
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/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>
Diffstat (limited to 'arch/um/Makefile')
0 files changed, 0 insertions, 0 deletions