Skip to content

Conversation

@qkaiser
Copy link
Contributor

@qkaiser qkaiser commented Feb 11, 2025

Report writing only worked if the report was being written to a child location of the extract directory. This was a byproduct of setting rw permissions on the extraction directory.

It did not work when the report file was being written to a location that is unrelated to the extraction directory.

Fixed by requesting rw access to the report's file parent directory.

I tried to get smart by only allowing make_reg and read_write on the file, but it never fully worked because of file truncation and the fact that LANDLOCK_ACCESS_FS_TRUNCATE is only available since ABI version 3 in landlock.

Solves #1101

@qkaiser qkaiser added the bug Something isn't working label Feb 11, 2025
@qkaiser qkaiser requested a review from vlaci February 11, 2025 14:11
@qkaiser qkaiser self-assigned this Feb 11, 2025
Report writing only worked if the report was being written to a child
location of the extract directory. This was a byproduct of setting
rw permissions on the extraction directory.

It did not work when the report file was being written to a location
that is unrelated to the extraction directory.

Fixed by requesting rw access to the report's file parent directory.

I tried to get smart by only allowing make_reg and read_write on the
file, but it never fully worked because of file truncation and the
fact that LANDLOCK_ACCESS_FS_TRUNCATE is only available since ABI
version 3 in landlock.
@qkaiser qkaiser force-pushed the 1101-report-file-sandboxing branch from a9c9bce to a8efa93 Compare February 11, 2025 14:11
@vlaci vlaci added this pull request to the merge queue Feb 11, 2025
Merged via the queue into main with commit 1d53031 Feb 11, 2025
22 checks passed
@vlaci vlaci deleted the 1101-report-file-sandboxing branch February 11, 2025 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants