Repository navigation
seccomp: say why sed -i needs fchmod, fchown and getgroups, and test it - #116
masabzev-amd wants to merge 1 commit into
Conversation
|
Thanks for tracking this down. The sed test is a good, concrete reproduction of P3-8. I think #110 (merged on main yesterday) already covers this, so I'd suggest closing this one:
For GAS, the fix is to move the AXIS pin ( Tested: GNU sed 4.9, WSL kernel 6.18, |
ROCm#110 allows fchmod, fchown and getgroups and fails the xattr calls with EOPNOTSUPP. Say at each allow-list entry what refusing it broke: GNU sed -i applies the original's mode and owner to its temporary file with fchmod and fchown, and `id` reads its groups with getgroups. Test that the three stay allowed, and that sed -i under the default filter edits the file without an "Operation not permitted" warning. Co-authored-by: Cursor <[email protected]>
d09e65c to
6f10b63
Compare
|
Thanks for cutting this down. The comments at the three entries say what #110's commit message says, where the next reader of the allowlist will look, and the sed test checks the tool-level symptom P3-8 was about. I checked that it bites: with Before it can merge:
Optional: Tested: 6f10b63 on main 85f76b5 (WSL 6.18, GNU sed 4.9): both new tests pass; |
#110 already allows fchmod, fchown and getgroups, and fails the xattr calls with EOPNOTSUPP, so this no longer changes the allow-list. It is rebased onto main and cut down to:
idreads its groups with getgroups.whitelist_allows_the_metadata_sed_sets: the three stay allowed.sed_inplace_edit_does_not_report_eperm: sed -i under the default filter edits the file, with no "Operation not permitted" warning. It skips where there is no sed.Not verified: this has not been built or tested since the rebase. The earlier version, which also allowed the xattr calls, is dropped: #110 keeps them denied because Landlock does not check them.