Repository navigation
Run LibreOffice inside the jail through a socket shim (v1.11.0) - #19
Merged
Merged
Conversation
… launcher Ticket: GENAI-2291
Ticket: GENAI-2291
…p production limits in the LibreOffice jail test A listener's write end closed outside the shim no longer causes a later close of the listener to close a reused descriptor. Non-blocking accept on a fake listener returns EAGAIN. The oosplash launcher is diverted with dpkg-divert, the shim build has its own RUN line, and the policy script requires bun 1.4.4 instead of stubbing perf_hooks. Ticket: GENAI-2291
…cy is unchanged Ticket: GENAI-2291
…the in-jail shim test A listener's write end replaced through dup3 must stay open when the listener closes, a failing dup3 must leave the listener fake, and close_range with CLOSE_RANGE_CLOEXEC must neither close nor forget descriptors. Ticket: GENAI-2291
…ument the policy check The policy check now runs bun ci in each checkout, so a new package release cannot change or break the render. The test comment says which limits are raised and why. The fork note covers the policy check and how to move its refs after a sync. Ticket: GENAI-2291
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.
This is #18 applied to
aproorg/v1.11.0, the branch the release train ships. The only extra change is the policy check comparing against upstream v1.11.0.Why
The upstream sync of 12 Nov denies
socket()andsocketpair()in the jail. LibreOffice needs both to start (oosplashforkssoffice.binover a socketpair, andsoffice.binopens an AF_UNIX single-instance pipe), so every conversion fails withERROR 4 forking process.What
docker/lo-socket-shim.c: a preload library that answerssocketpair(AF_UNIX)andsocket(AF_UNIX)with pipes. Every call on a descriptor it did not create goes to the real libc symbol. It also tracks descriptors throughclose,close_range,dup2anddup3.api/Dockerfile: builds the shim in the gcc stage and divertsprogram/oosplashto a two-line launcher that preloads it. Every entry (soffice,libreoffice,loffice,program/soffice) goes throughoosplash, and no other job sees the shim.scripts/apro-policy-unchanged.shproves the rendered policy is byte-identical to upstream v1.11.0 (c7bf37d69), and thatnsjail.tsandsandbox.cfgare unchanged.tests/soffice_in_jail_image.ts: runs real conversions through the production guest image inside the real jail, at production limits. It includes a control that must fail withERROR 4without the shim, checks that job code still gets EPERM for sockets, and checks that a job loading the shim itself gains nothing..github/workflows/apro-soffice.yml: runs the test on amd64 and arm64, and the policy check, on pull requests and on pushes tosync/**. It is kept apart from upstream'sci.yml, so syncs never conflict with it.docs/apro-libreoffice-in-jail.md: why the shim exists, and what breaks it.Test
Ticket: GENAI-2291