Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

we need new bind directory update option for specific timeperiod #3909

Open
osevan opened this issue Jan 22, 2021 · 1 comment
Open

we need new bind directory update option for specific timeperiod #3909

osevan opened this issue Jan 22, 2021 · 1 comment
Labels
enhancement New feature request

Comments

@osevan
Copy link

osevan commented Jan 22, 2021

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
Copy link
Author

osevan commented Feb 15, 2021

Anyone can follow my thoughts ?

@rusty-snake rusty-snake added the enhancement New feature request label Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature request
Projects
None yet
Development

No branches or pull requests

2 participants