mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 22:01:33 -06:00
[GH-ISSUE #3909] bind directory update option for specific time period #2451
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#2451
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @osevan on GitHub (Jan 22, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3909
Overlayfs of firejail,should update content of folder in specific time frame without restarting sandbox and without bind option
As addition hardening thinking step is, to allow specific file names AND extensions of files to create (write inside sandbox) in specific paths
Example in profile:
for filenames :
filename-allow-write path filename1,filename2,filename3
filename-allow-write /var/html/ index.html,index.php
For fileextensions
fileextension-allow-write path .extension1,.extension2,*.extension3
fileextension-allow-write /var/html/ *.html
fileextension-allow-write /var/php/ *.php
fileextension-allow-write /var/js/ *.js
This option combined with readonly inside sandbox specified inside profil, give us absolute filesystem hardening.
Maybe remounting or updating specific directorys in time frame is the solution, but when you have more elegant method you could give a try.
For example
In profile we can declare as:
read-only /var/html
Or
read-only everything
For everything read only exept for log files as additional rule in profile.
read-only-exept /var/log/logfile
Update-folder path timeperiodinseconds
Update-folder /var/html/ 3
Update-file /var/html/index.html 3
These paths are monitored every 3 seconds outside of sandbox, if something changed on real origin and source path, and if true, writing files inside sandbox with linux function splice back, to avoid locks and overhead and for zerocopy transfer.
I hope I was able to stimulate your thought.
Thanks an
best regards
@osevan commented on GitHub (Feb 15, 2021):
Anyone can follow my thoughts ?