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

lib/copydir:copy_entry(): use temporary stat buffer #974

Merged
merged 1 commit into from
Mar 21, 2024
Merged

lib/copydir:copy_entry(): use temporary stat buffer #974

merged 1 commit into from
Mar 21, 2024

Conversation

ensc
Copy link
Contributor

@ensc ensc commented Mar 18, 2024

There are no guarantees that fstatat() does not clobber the stat buffer on errors.

Use a temporary buffer so that the following code sees correct attributes of the source entry.

Issue #973

There are no guarantees that fstatat() does not clobber the stat
buffer on errors.

Use a temporary buffer so that the following code sees correct
attributes of the source entry.

Issue #973

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Copy link
Collaborator

@alejandro-colomar alejandro-colomar left a comment

Choose a reason for hiding this comment

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

Revieded-by: Alejandro Colomar <alx@kernel.org>

@alejandro-colomar alejandro-colomar linked an issue Mar 19, 2024 that may be closed by this pull request
@alejandro-colomar alejandro-colomar merged commit 0006193 into shadow-maint:master Mar 21, 2024
9 checks passed
alejandro-colomar pushed a commit that referenced this pull request Mar 21, 2024
There are no guarantees that fstatat() does not clobber the stat
buffer on errors.

Use a temporary buffer so that the following code sees correct
attributes of the source entry.

Link: <#973>
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Reviewed-by: Alejandro Colomar <alx@kernel.org>
Cherry-picked-from: 0006193 ("lib/copydir:copy_entry(): use temporary stat buffer")
Link: <#974>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
alejandro-colomar pushed a commit that referenced this pull request Mar 21, 2024
There are no guarantees that fstatat() does not clobber the stat
buffer on errors.

Use a temporary buffer so that the following code sees correct
attributes of the source entry.

Link: <#973>
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Reviewed-by: Alejandro Colomar <alx@kernel.org>
Cherry-picked-from: 0006193 ("lib/copydir:copy_entry(): use temporary stat buffer")
Link: <#974>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

copy_entry() uses uninitialized data
2 participants