Bug 8875 - NFS: Fix an off by one in root_nfs_cat()
Summary: NFS: Fix an off by one in root_nfs_cat()
Status: RESOLVED FIXED
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: fs (show other bugs) fs
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: zhujun
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-24 11:07 UTC by zhujun
Modified: 2024-04-24 14:25 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zhujun cmss_group 2024-04-24 11:07:26 UTC
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.


社区有patch已经解决

 NFS: Fix an off by one in root_nfs_cat()

commit b8c52f7d08f18cc0577be1b774194a94a9e5492a

Reference:https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=b8c52f7d08f18cc0577be1b774194a94a9e5492a

git cherry-pick -s b8c52f7d08(with stable-v5.10.215 repo added)
Comment 1 小龙 admin 2024-04-24 11:11:53 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3093
Comment 2 Joseph Qi alibaba_cloud_group 2024-04-24 14:25:25 UTC
(In reply to 小龙 from comment #1)
> The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3093

merged