-
Notifications
You must be signed in to change notification settings - Fork 8k
fs/ext2: Fix NULL dereference when fs_stat queries root. #93764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fs/ext2: Fix NULL dereference when fs_stat queries root. #93764
Conversation
1e091b4
to
10135bd
Compare
We need bug report for the issue and will have to generate backport. @bas-archembedded Can you log Zephyr issue for the problem you have found and reference it here as being fixed/ |
FYI @fzdobylak |
Opened issue in #94000 |
|
ok then. @fkokosinski FYI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK.
@bas-archembedded One more thing: can you reference the bug fixed in commit message? Add the "Fixes #94000" line please. |
@de-nordic Shall I add the extra __ASSERT check as @cfriedt suggested, to be extra safe ? |
You mean when we get |
When fs_stat() queries the root / mountpoint it should return its root i_node but instead it tries to return the parent i_node which does not exist. Fix this by checking if parent is set otherwise return the root i_node. Fixes zephyrproject-rtos#94000. Signed-off-by: Bas van Loon <[email protected]>
10135bd
to
05e59b2
Compare
I will keep it as is, "Fixes" line added. |
|
When fs_stat() queries the root / mountpoint it should return its root i_node but instead it tries to return the parent i_node which does not exist. Fix this by checking if parent is set otherwise return the root i_node.