Repository navigation
0.24.1: preserve read-only grants under Linux confinement - #49
Merged
Merged
Conversation
Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
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.
Linux confinement in 0.24.0 is advertised for Landlock ABI 1 and 2, whose write restrictions do not cover file truncation. A process can therefore truncate an existing file in a read-only grant through
truncate(2)oropen(O_RDONLY | O_TRUNC)without using openkal.Version 0.24.1 requires ABI 3 before advertising confinement or accepting a confined spawn. Unsupported kernels refuse before starting the program. The ABI probe cache also uses atomic reads and writes during concurrent first queries. Regression coverage first proves the granted file can be opened for reading, then requires both raw truncation operations to fail with EACCES and checks that the file retains its length.
Validation:
The kernel documentation describes the independent truncate permission: https://docs.kernel.org/userspace-api/landlock.html#truncating-files
Tracks mcpp-community/mcpp#885 (security and concurrency review). Existing published tags and archives remain unchanged.
Full CI run 41615764563 passes both compiler jobs, including conformance, surface and C-library independence checks, at ee4a4a1.