NFS: Fix an off by one in root_nfs_cat()
stable inclusion from stable-v4.19.311 commit 9bb320c5cea50e7fa82a477743a6a0546eaa37b3 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IA7XXI CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9bb320c5cea50e7fa82a477743a6a0546eaa37b3 -------------------------------- [ Upstream commit 698ad1a538da0b6bf969cfee630b4e3a026afb87 ] The intent is to check if 'dest' is truncated or not. So, >= should be used instead of >, because strlcat() returns the length of 'dest' and 'src' excluding the trailing NULL. Fixes: 56463e50 ("NFS: Use super.c for NFSROOT mount option parsing") Signed-off-by:Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by:
Benjamin Coddington <bcodding@redhat.com> Signed-off-by:
Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Wang Zhaolong <wangzhaolong1@huawei.com>
Loading
Please sign in to comment