Commit 19b3ca65 authored by Zichen Xie's avatar Zichen Xie Committed by Greg Kroah-Hartman
Browse files

NFS: Fix potential buffer overflowin nfs_sysfs_link_rpc_client()



[ Upstream commit 49fd4e34 ]

name is char[64] where the size of clnt->cl_program->name remains
unknown. Invoking strcat() directly will also lead to potential buffer
overflow. Change them to strscpy() and strncat() to fix potential
issues.

Signed-off-by: default avatarZichen Xie <zichenxie0106@gmail.com>
Reviewed-by: default avatarBenjamin Coddington <bcodding@redhat.com>
Signed-off-by: default avatarAnna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 2a069636
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment