[PR #6747] [MERGED] modif: improve "Failed mount" error messages in util.c #6149

Closed
opened 2026-05-05 10:51:39 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/6747
Author: @kmk3
Created: 5/12/2025
Status: Merged
Merged: 6/4/2025
Merged by: @kmk3

Base: masterHead: util-improve-mount-debug


📝 Commits (1)

  • d771af6 modif: improve "Failed mount" error messages in util.c

📊 Changes

1 file changed (+39 additions, -8 deletions)

View changed files

📝 src/firejail/util.c (+39 -8)

📄 Description

Include the relevant mount path(s).

Example:

Before:

$ firejail --debug --noprofile --blacklist=/run true
[...]
Disable /run
Disable /sys/fs
Failed mount: No such file or directory
Error: ../../src/firejail/fs.c:148: disable_file: disable file: No such file or directory
Error: proc 12345 cannot sync with peer: unexpected EOF
Peer 12345 unexpectedly exited with status 1

After:

$ firejail --debug --noprofile --blacklist=/run true
[...]
Disable /run
Disable /sys/fs
Failed to mount /run/firejail/firejail.ro.dir on /sys/fs: No such file or directory
Error: ../../src/firejail/fs.c:148: disable_file: disable file: No such file or directory
Error: proc 12345 cannot sync with peer: unexpected EOF
Peer 12345 unexpectedly exited with status 1

This helps clarify that it is not possible to blacklist /run, as
firejail uses files inside /run/firejail in order to set up the sandbox.

In the above example, when processing the first blacklist, firejail
bind-mounts /run/firejail/firejail.ro.dir (a directory with no
read/write/execute permissions) on top of /run, rendering /run/firejail
inaccessible. When attempting to process the next blacklist (for
/sys/fs), firejail is unable to access /run/firejail, so it fails to
bind mount /run/firejail/firejail.ro.dir on top of /sys/fs and aborts.

Relates to #6711 #6740.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netblue30/firejail/pull/6747 **Author:** [@kmk3](https://github.com/kmk3) **Created:** 5/12/2025 **Status:** ✅ Merged **Merged:** 6/4/2025 **Merged by:** [@kmk3](https://github.com/kmk3) **Base:** `master` ← **Head:** `util-improve-mount-debug` --- ### 📝 Commits (1) - [`d771af6`](https://github.com/netblue30/firejail/commit/d771af6286876f5dda6d21bdf66bd19e15c8891d) modif: improve "Failed mount" error messages in util.c ### 📊 Changes **1 file changed** (+39 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/firejail/util.c` (+39 -8) </details> ### 📄 Description Include the relevant mount path(s). Example: Before: $ firejail --debug --noprofile --blacklist=/run true [...] Disable /run Disable /sys/fs Failed mount: No such file or directory Error: ../../src/firejail/fs.c:148: disable_file: disable file: No such file or directory Error: proc 12345 cannot sync with peer: unexpected EOF Peer 12345 unexpectedly exited with status 1 After: $ firejail --debug --noprofile --blacklist=/run true [...] Disable /run Disable /sys/fs Failed to mount /run/firejail/firejail.ro.dir on /sys/fs: No such file or directory Error: ../../src/firejail/fs.c:148: disable_file: disable file: No such file or directory Error: proc 12345 cannot sync with peer: unexpected EOF Peer 12345 unexpectedly exited with status 1 This helps clarify that it is not possible to blacklist /run, as firejail uses files inside /run/firejail in order to set up the sandbox. In the above example, when processing the first blacklist, firejail bind-mounts /run/firejail/firejail.ro.dir (a directory with no read/write/execute permissions) on top of /run, rendering /run/firejail inaccessible. When attempting to process the next blacklist (for /sys/fs), firejail is unable to access /run/firejail, so it fails to bind mount /run/firejail/firejail.ro.dir on top of /sys/fs and aborts. Relates to #6711 #6740. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 10:51:39 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#6149
No description provided.