]> git.baikalelectronics.ru Git - kernel.git/commit
smc: fix out of bound access in smc_nl_get_sys_info()
authorJakub Kicinski <kuba@kernel.org>
Tue, 12 Jan 2021 16:21:21 +0000 (17:21 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 13 Jan 2021 04:22:01 +0000 (20:22 -0800)
commit7b24a2bd74b81926d4a1ddc62d4ff106475ac819
tree09e27f006401b300b01ef8d4bcb890bbf6bbcdaf
parent31d027198b1e103927af1dfa716999b6e5e42bba
smc: fix out of bound access in smc_nl_get_sys_info()

smc_clc_get_hostname() sets the host pointer to a buffer
which is not NULL-terminated (see smc_clc_init()).

Reported-by: syzbot+f4708c391121cfc58396@syzkaller.appspotmail.com
Fixes: e47932166c0e ("net/smc: Add support for obtaining system information")
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/smc/smc_core.c