aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p
diff options
context:
space:
mode:
authorAnant Thazhemadam <anant.thazhemadam@gmail.com>2020-10-12 09:54:04 +0530
committerDominique Martinet <asmadeus@codewreck.org>2020-10-12 10:05:47 +0200
commit7ca1db21ef8e0e6725b4d25deed1ca196f7efb28 (patch)
tree95f1225ce898c15c14a7eecb8203940ed25b96b8 /fs/9p
parent9p/xen: Fix format argument warning (diff)
downloadlinux-dev-7ca1db21ef8e0e6725b4d25deed1ca196f7efb28.tar.xz
linux-dev-7ca1db21ef8e0e6725b4d25deed1ca196f7efb28.zip
net: 9p: initialize sun_server.sun_path to have addr's value only when addr is valid
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>
Diffstat (limited to 'fs/9p')
0 files changed, 0 insertions, 0 deletions