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

sshd: look for overlayfs before modifying auth keys #211

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

matttbe
Copy link
Collaborator

@matttbe matttbe commented Dec 30, 2024

Only looking if the rootfs is in read-only might not be enough, e.g. if the home directory is mounted in RW.

Instead, we can simply check in which file-system the authorized_keys file is in: if it is in an overlayfs, it is safe.

Note that the '%T' format could be used with stat, but it looks like it is not working with busybox.

Only looking if the rootfs is in read-only might not be enough, e.g. if
the home directory is mounted in RW.

Instead, we can simply check in which file-system the authorized_keys
file is in: if it is in an overlayfs, it is safe.

Note that the '%T' format could be used with stat, but it looks like it
is not working with busybox.

Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
@matttbe matttbe requested a review from arighi December 30, 2024 17:47
@arighi arighi merged commit f53c692 into arighi:main Dec 30, 2024
6 checks passed
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.

2 participants