Match Linux message-queue unlink permissions - #15195
Merged
Merged
Conversation
copybara-service
Bot
force-pushed
the
test/cl991778973
branch
2 times, most recently
from
October 1, 2026 20:45
301de49 to
e8b02cf
Compare
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
Bot
force-pushed
the
test/cl991778973
branch
4 times, most recently
from
October 3, 2026 10:52
cfbd120 to
b37c45b
Compare
PiperOrigin-RevId: 992816386
copybara-service
Bot
force-pushed
the
test/cl991778973
branch
from
October 3, 2026 11:26
b37c45b to
142ce81
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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