Skip to content
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: fuse: Avoid possible buffer overflow #66592

Merged
merged 1 commit into from Jan 8, 2024

Conversation

ceolin
Copy link
Member

@ceolin ceolin commented Dec 15, 2023

Checks path's size before copying it to local variable.

Checks path's size before copying it to local variable.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
@ceolin
Copy link
Member Author

ceolin commented Jan 2, 2024

@de-nordic would you mind taking a look again ?

}

memcpy(dir_path, path, len);
dir_path[len] = '\0';
return strcmp(dirname(dir_path), "/") == 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some day I will fix this atrocity.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@nashif nashif merged commit 3267bdc into zephyrproject-rtos:main Jan 8, 2024
16 checks passed
@ceolin ceolin added backport v3.4-branch Backport to the v3.4-branch backport v3.5-branch Backport to the v3.5-branch labels Feb 18, 2024
@cfriedt cfriedt added the backport v2.7-branch Request backport to the v2.7-branch label Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: File System backport v2.7-branch Request backport to the v2.7-branch backport v3.4-branch Backport to the v3.4-branch backport v3.5-branch Backport to the v3.5-branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants