Skip to content

runsc: create file as destination for file mount #11719

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented May 12, 2025

runsc: create file as destination for file mount

Linux does not allow mounting files on top of directories and vice versa.
This can lead to unexpected behavior and issues, such as dockerd failing
to start when it encounters a file mount that appears as a directory entry
during /dev enumeration.

After this change, new mount destinations (files or directories) are created
with permissions (0644 for files, 0755 for directories) consistent with runc
behavior. Previously, new directories were created with 0777.

The test case that request a bind mount into /dev/fd has been removed.
/dev/fd is a symlink to /proc/self/fd.

@copybara-service copybara-service bot added the exported Issue was exported automatically label May 12, 2025
@copybara-service copybara-service bot force-pushed the test/cl753398796 branch 8 times, most recently from 7028af3 to 368c1dc Compare May 15, 2025 01:30
Linux does not allow mounting files on top of directories and vice versa.
This can lead to unexpected behavior and issues, such as `dockerd` failing
to start when it encounters a file mount that appears as a directory entry
during `/dev` enumeration.

After this change,  new mount destinations (files or directories) are created
with permissions (0644 for files, 0755 for directories) consistent with `runc`
behavior. Previously, new directories were created with 0777.

The test case that request a bind mount into /dev/fd has been removed.
/dev/fd is a symlink to /proc/self/fd.

PiperOrigin-RevId: 753398796
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exported Issue was exported automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant