Skip to content

fix(linux): close the broker's copy of an opened file before the caller resumes - #227

Merged
lexoliu merged 1 commit into
mainfrom
fix/broker-fd-before-resume
Nov 12, 2026
Merged

lexoliu merged 1 commit into
mainfrom
fix/broker-fd-before-resume

Conversation

@lexoliu

@lexoliu lexoliu commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

The broker answered a brokered open with SECCOMP_ADDFD_FLAG_SEND, resuming the caller while its own copy of the descriptor was still open, so a script the caller had just written could fail execve with ETXTBSY. The descriptor is now installed without the flag, the broker's copy is dropped, and the answer carrying the installed number is sent after; the filter's WAIT_KILLABLE_RECV keeps the caller waiting across both steps. A broker test writes and runs a script 200 times in a row.

Closes #226

@lexoliu
lexoliu added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 423bf66 Nov 12, 2026
26 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The broker resumes a caller before closing its copy of the opened file, so a just-written script fails exec with ETXTBSY

1 participant