Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

make exec.fifo can be safety read#4932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ningmingxiao wants to merge1 commit intoopencontainers:main
base:main
Choose a base branch
Loading
fromningmingxiao:exec.fifo

Conversation

@ningmingxiao
Copy link
Contributor

@ningmingxiaoningmingxiao commentedOct 14, 2025
edited
Loading

some people read-only mount /var/run into container,some process will read /run/runc/id/exec.fifo (for example antivirus apps) it will cause runc start failed.
after this commit /run/runc/id/exec.fifo has a lower risk of being misread even user doesn't ro bind /var/run into container.@kolyshkin@cyphar

@ningmingxiaoningmingxiaoforce-pushed theexec.fifo branch 2 times, most recently from42a0831 to640f468CompareOctober 14, 2025 02:30
@ningmingxiaoningmingxiao changed the titlemake exec.fifo can't be write on readonly tmpfsmake exec.fifo can't be read on readonly tmpfsOct 14, 2025
@ningmingxiaoningmingxiao changed the titlemake exec.fifo can't be read on readonly tmpfsmake exec.fifo can be safety read on readonly tmpfsOct 14, 2025
@cyphar
Copy link
Member

We need to be quite careful around changing this code, as there is a lot of history behind how we ended up with this fairly ugly FIFO solution.

The signalling model we have takes advantage of the fact thatwrite to a FIFO will block until a reader appears and then you are guaranteed to continue running. This means that multiplerunc start invocations will not block each other, and if (hypothetically)runc start crashes after opening the file descriptorrunc init will still succeed. I think we tried doing it the way you've done in this PR and there was some deadlock scenario, though this was all ~10 years ago now so I can't quite remember the details.

We used to use signals and switched to the FIFO because of lots of issues with that model (signal coalescing and pid1 has special signal semantics). That being said, I wonder ifSIGSTOP/SIGCONT would work (I think we used to use custom signals, which was a huge cause of issues).

some people read-only mount /var/run into container

This seems likeA Very Bad Idea ™️ -- unix sockets are not protected byro bind-mounts, and so if they are running a container process as root you can easily break out of the container through/var/run/docker.sock or various other sockets in/var/run (/var/run/cups/cups.sock would be fun to exploit thanks to the enormous amount of printer driver RCEs).

@ningmingxiao
Copy link
ContributorAuthor

ningmingxiao commentedOct 14, 2025
edited
Loading

I can't prevent user bind /var/run into container. I find crun start will write data into the fifo. may be we can refer it.
and use this commit /run/runc/id/exec.fifo have a smaller time window will be misread.@cyphar

Signed-off-by: ningmingxiao <ning.mingxiao@zte.com.cn>
@ningmingxiaoningmingxiao changed the titlemake exec.fifo can be safety read on readonly tmpfsmake exec.fifo can be safety readOct 14, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@ningmingxiao@cyphar

[8]ページ先頭

©2009-2025 Movatter.jp