Skip to content

Match Linux message-queue unlink permissions - #15195

Merged
copybara-service[bot] merged 2 commits into
masterfrom
test/cl991778973
Oct 3, 2026
Merged

copybara-service[bot] merged 2 commits into
masterfrom
test/cl991778973

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Match Linux message-queue unlink permissions

The mqfs root introduced in 61cbf77 was read-only (0555), so mq_unlink rejected queue owners without DAC override capabilities. Linux instead creates a world-writable sticky directory 1.

Use the same directory mode and enforce sticky ownership checks on the registry unlink path, which bypasses the normal VFS unlink checks. Drop DAC bypass in the existing queue permission tests and check that another unprivileged user cannot unlink the queue.

Assisted-by: OpenAI Codex

FUTURE_COPYBARA_INTEGRATE_REVIEW=#15159 from tamird:mq-permission-capabilities 768231d

@copybara-service copybara-service Bot added the exported Issue was exported automatically label Oct 1, 2026
@copybara-service
copybara-service Bot force-pushed the test/cl991778973 branch 2 times, most recently from 301de49 to e8b02cf Compare October 1, 2026 20:45
The mqfs root introduced in 61cbf77 was read-only (0555), so
mq_unlink rejected queue owners without DAC override capabilities.
Linux instead creates a world-writable sticky directory [1].

Use the same directory mode and enforce sticky ownership checks on the
registry unlink path, which bypasses the normal VFS unlink checks.
Drop DAC bypass in the existing queue permission tests and check that
another unprivileged user cannot unlink the queue.

[1]: https://github.com/torvalds/linux/blob/830b3c68c/ipc/mqueue.c#L404-L422

Assisted-by: OpenAI Codex
@copybara-service
copybara-service Bot force-pushed the test/cl991778973 branch 4 times, most recently from cfbd120 to b37c45b Compare October 3, 2026 10:52
@copybara-service
copybara-service Bot merged commit 142ce81 into master Oct 3, 2026
2 of 4 checks passed
@copybara-service
copybara-service Bot deleted the test/cl991778973 branch October 3, 2026 11:26
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.

2 participants