Skip to content

Conversation

@copybara-service
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 10 times, most recently from c678c8e to 7a78a35 Compare May 17, 2025 00:36
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: 759827816
@copybara-service copybara-service bot closed this May 17, 2025
@copybara-service copybara-service bot deleted the test/cl753398796 branch May 17, 2025 01:22
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