Bug 8868 - fat: fix uninitialized field in nostale filehandles
Summary: fat: fix uninitialized field in nostale filehandles
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 10:02 UTC by zhujun
Modified: 2024-04-24 11: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 10:02:04 UTC
When fat_encode_fh_nostale() encodes file handle without a parent it
stores only first 10 bytes of the file handle. However the length of the 
file handle must be a multiple of 4 so the file handle is actually 12
bytes long and the last two bytes remain uninitialized. This is not 
great at we potentially leak uninitialized information with the handle
to userspace. Properly initialize the full handle length.


社区有patch已经解决

fat: fix uninitialized field in nostale filehandles

commit a276c595c3a629170b0f052a3724f755d7c6adc6

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

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

merged