Commit graph

37 commits

Author SHA1 Message Date
rusty-snake
4747e0ed7f
Whitelist runuser common (#3286)
* introduce whitelist-runuser-common.inc

 * If an applications does not need a whitelist it can/should be
   nowhitelisted. Example:

     nowhitelist ${RUNUSER}/pulse
     include whitelist-runuser-common.inc

 * ${RUNUSER}/bus is inaccessible with nodbus regardless of the
   whitelist. (as it should)

 * strange wayland setups with an second wayland-compostior need to
   whitelist ${RUNUSER}/wayland-1, ${RUNUSER}/wayland-2 and so on.

 * some display-manager store there Xauthority file in ${RUNUSER}.
   test results with fedora 31:
   - ssdm: ~/.Xauthority is used
   - lightdm: /run/lightdm/USER/Xauthority
   - gdm: /run/user/UID/gdm/Xauthority

 * IMPORTANT: ATM we can only enable this for non-graphical and GTK3
   programs because mutter (GNOMEs window-manger) stores the Xauthority
   file for Xwayland under /run/user/UID/.mutter-Xwaylandauth.XXXXXX
   where XXXXXX is random. Until we have whitelist globbing we can't
   whitelist this file. QT/KDE and other toolkits without full wayland
   support won't be able to start.

* wru update 1

- add wru to more profiles.
- blacklist ${RUNUSER} works for the most cli programs too.

* add wruc to more profiles

* fixes

* fixes

* wruc: hide pulse pid

* update

* remove wruc from all the x11 profiles

* fixes

* fix ordering

* read-only

* revert read-only

* update

*
2020-03-31 16:51:02 +00:00
rusty-snake
a3cc09e5d9 add 'blacklist ${RUNUSER}/wayland-*' to all profi…
…les with 'blacklist /tmp/.X11-unix'
2020-01-18 11:20:32 +01:00
glitsj16
93c1480ff9
Gentoo fixes (#3120)
* fix private-etc on gentoo

* Fix private-etc on gentoo

* Fix evince on gentoo
2020-01-04 02:34:03 +00:00
rusty-snake
6e44b5dde4
whitelist-usr-share-common.inc (#2972)
* Work on whitelist-usr-share-common

* sorting; add Modules + QT/KDE stuff

* add wusc.inc to more profiles [needs testing]

* update

* gitg, firefox, evince

* /usr/share/{p11-kit,pixmaps,pki,qt5,tcl8.6,terminfo}

* more profiles

* remove wusc.inc from feedreader

Even with 'whitelist /usr/share/*', feedreader trys to dereference a
NULL pointer.

* more profiles

* whitelist /usr/share breaks wget

even with whitelist /usr/share/*

* extend wusc.inc

* update

* Add alsa,crypto-policies and zoneinfo

* readd wusc.inc to wget and feedreader

* update

* testing results: Debian Buster with KDE

* more KDE stuff

* fix tb
2019-10-05 19:24:37 +00:00
rusty-snake
4455f3cd0d add missing blacklist paths 2019-09-28 14:51:10 +02:00
rusty-snake
2373fcd74d many profile fixes (1)
- add novideo to a lot of profiles
   (there are still more profiles where novideo can be added)
 - remove commente mdwe from some gnome applications
 - add descriptions to some profiles
 - blacklist ${HOME}/.cargo/credentials
 - move ${HOME}/.git-credentials and ${HOME}/.git-credential-cache to
   'top secret' in disable-common.inc
 - some ordering in disable-programs.inc
 - merge tor browser blacklists to ${HOME}/.tor-browser*
 - qupzilla.profile redirect to falkon.profile
 - blacklist gnome-builder paths
 - fix transmission profiles inlude
 - much more
2019-08-26 00:22:59 +02:00
glitsj16
f8f0e0c9d4
Support media on other drives in youtube-dl.profile
Thanks to @SkewedZeppelin for catching this, see comments in https://github.com/netblue30/firejail/pull/2584.
2019-07-11 07:21:03 +00:00
glitsj16
7aed6fb762
Add to comment on pip install in youtube-dl.profile
Try to help users more explicitly when they have youtube installed under ${HOME}, see #2833.
2019-07-07 10:59:05 +00:00
glitsj16
0dffeb15b6
Add youtube-dl config handling (#2836)
* Add youtube-dl config to disable-programs.inc

* Add config handling to youtube-dl

* Add youtube-dl config handling to celluloid.profile

* Add youtube-dl config handling to mpv.profile

* Add youtube-dl config handling to smplayer.profile

* Add youtube-dl config handling to mpsyt.profile
2019-07-06 23:35:40 +00:00
Vincent43
2529d1d486
Merge pull request #2766 from rusty-snake/fix-all-private-bin_etc-lines
automatically fixed all private-{bin,etc} lines
2019-06-15 11:53:03 +00:00
glitsj16
3f94684661
Streamline mdwe comment (#2769)
* Streamline mdwe comment for authenticator

* Streamline mdwe comment for autokey-common

* Streamline mdwe comment for baobab

* Streamline mwde comment for bitwarden

* Streamline mdwe comment for clawsker

* Streamline mdwe comment for devhelp

* Streamline mdwe comment for d-feet

* Streamline mdwe comment for enpass

* Streamline mdwe comment for eo-common

* Streamline mdwe comment for exfalso

* Streamline mdwe comment for font-manager

* Streamline mdwe comment for geekbench

* Streamline mdwe comment for mpDris2

* Streamline mdwe comment for ocenaudio

* Streamline mdwe comment for QMediathekView

* Streamline mdwe comment for subdownloader

* Streamline mdwe comment for viewnior

* Streamline mdwe comment for youtube-dl
2019-06-13 20:50:38 +00:00
rusty-snake
019fa047d6
automatically fixed all private-{bin,etc} lines 2019-06-13 19:49:13 +02:00
netblue30
72494481b2 fix youtube-dl 2019-06-11 12:18:47 -04:00
rusty-snake
217d0e2594
many profile cleanups 2019-06-02 14:09:20 +02:00
rusty-snake
17f8035132
Create allow-INTERPETER.inc (#2736)
* Create allow-INTERPETER.inc

 * allow-lua.inc
 * allow-perl.inc
 * allow-python2.inc
 * allow-python3.inc

* Create allow-java.inc

* Update profiles to use new allow-INTERPRETER.inc includes

* Update profiles to use new allow-INTERPRETER.inc includes 2/x

* Fix order of allow-INTERPRETER.inc includes

* Update profiles to use new allow-INTERPRETER.inc includes 3/x

* Fixup comment about allow-java.inc

https://github.com/netblue30/firejail/pull/2736#discussion_r289597997

* Add Arch Linux specific paths to allow-perl.inc
2019-06-01 20:19:01 +00:00
rusty-snake
bcb2a2f0a8 Harden youtube-dl.profile (#2584)
* Harden youtube-dl.profile

* Add dis-exec to ytdl

* Comment mdwe in ytdl
2019-03-13 17:35:00 +00:00
Tad
1d11102f6d Temporary fix for noexec ${HOME} breakage 2019-02-02 06:14:04 -05:00
pirate486743186
aee08f8309 allowing local python* in mpv and youtube-dl #2262 2018-11-26 03:34:14 +01:00
netblue30
92bff8a23c
Merge pull request #2201 from SkewedZeppelin/u2f-ap
Add nou2f to all profiles
2018-10-17 08:00:00 -05:00
Glenn Washburn
7c533c9aa5 Remove "/etc/firejail/" from all include paths, now that profile_read will search for the file. 2018-10-17 00:43:54 -05:00
Tad
284e0750e5 Add nou2f to all profiles
- Closes #2194
2018-10-15 13:14:15 -04:00
Tad
82a0cd2e71 Cleanup descriptions 2018-08-13 22:35:05 -04:00
Tad
40330b246d Add descriptions to profiles, pulled from Ubuntu 18.04 2018-08-13 21:48:41 -04:00
Tad
e5aba00d01 Add disable-xdg.inc to ~100 profiles 2018-07-24 12:52:13 -04:00
Fred Barclay
2d8ff695ad
WIP: Blacklist common programming interpreters. (#1837)
* Use path variable instead of full path when blacklisting devel tools.

* Part 1: blacklist python, perl, ruby, etc in disable-interpreters.inc

* Part 2: allow access to java as needed

* Typo: missing blacklist

* Part 3: allow perl access as needed

* typo

* Add xreader thumbnailer and previewer profiles

* Add xplayer audio-preview and thumbnailer profiles

* Add atril thumbnailer and previewer profiles

* More fixups after adding disable-interpreters.inc

* Blacklist javac

* More javac noblacklisting

* Remove javac from dex2jar, libreoffice, multimc5, and pdfsam profiles

* --nodbus, first draft for #1825

* dbus.c

* rework akonadi integration

the usr.sbin.mysqld-akonadi apparmor profile, enforced by default in ubuntu and
debian testing (and probably opensuse), doesn't play well with a number of firejail options.
the reason for this is that once the no_new_privs bit is set, apparmor profile
transitions are forbidden.

enforcing our own apparmor policy instead is also no solution, because
these programs don't even start without d-bus.

relaxing the kmail profile was necessary so that kmail can fire up akonadi itself,
just in case akonadi has not been started earlier already by another program.
this is always an issue when kmail is the only installed akonadi client, but
there may be more circumstances. for reasons outlined above this doesn't help
debian and ubuntu (opensuse?) users though :-/

a brief summary of the seccomp exceptions: chroot is needed for qt webengine,
io_prioset for the akonadi indexing agent, io_getevents, io_submit, io_setup
are needed for mysqld. when akonadi has an sqlite3 backend, less exceptions
to the seccomp filter are necessary, but mysqld is the default.

in the future all kontact suite profiles  (itm only kmail, knotes) should
probably be redirections to akonadi_control, but the issues with apparmor
make this somewhat impractical for now (options like 'protocol' couldn't go to
akonadi_control.local any more, if current kmail redirected to there).

* Add nodbus to some profiles - part 1

* Spotify works with nodbus on Arch

* Enable nodbus for keepassx and keepassxc profiles.

I've tested on keepassxc but should work for keepassx as well. Settings are not immutable.

* recalibrate dbus access, deploy nodbus option

see #1822 and #1825. also systematically replaces
'blacklist /run/user/*/bus' with 'nodbus'.

with contributions from @Fred-Barclay

* various blacklist additions

* Add a profile for ncdu, enable private-etc in Steam again, and fixup gnome-recipes

* comment nodbus where it interferes with dconf

pending further discussion

* Add a disabled and extensive private-bin for Steam

* Further improve private-bin in steam

* comment apparmor, net where they interfere with dconf - #1843

* gnome-calculator fixup

* spectre support for clang compiler

* spectre clang support

* enable/disable dbus handling in /etc/firejail/firejail.config

* nodbus man pages, etc.

* redirect knotes to kmail, some tweaks

* testing

* gimp fixup

* Even more fixups after adding disable-interpreters.inc

* AWS and GCP store credentials in local directories as part of project setup.

Configuration for cloud providers is sensitive information; it should be
in the default block list. I didn't see profiles for gcloud or awscli,
so haven't added any exclusions.

boto and kubectl are not provider-specific, but also store credentials for
whichever platforms they happen to be being used with.

* testing

* consolidate makefiles

* gitignore

* Use path variable instead of full path when blacklisting devel tools.

* Part 1: blacklist python, perl, ruby, etc in disable-interpreters.inc

* Part 2: allow access to java as needed

* Typo: missing blacklist

* Part 3: allow perl access as needed

* typo

* More fixups after adding disable-interpreters.inc

* Blacklist javac

* More javac noblacklisting

* Remove javac from dex2jar, libreoffice, multimc5, and pdfsam profiles

* Cleanup rebase leftovers

* imagej doesn't need javac access

* Add cc to blacklisted compilers

* Use wildcards when blacklisting some gcc paths

* Blacklist lua in disable-interpreters

* Correct blacklist for node.js

* Fred Barclay note: some of these commits (all of the ones that don't affect files inside etc/) aren't mine but were added during a rebase + squash
2018-04-02 10:56:55 -05:00
netblue30
8c04e94af8 whitelist /var 2017-09-18 09:50:39 -04:00
Tad
104dde49c0 Fix nodvd placement 2017-08-13 15:53:04 -04:00
netblue30
647b6a220e added nodvd to most profiles 2017-08-13 07:36:06 -04:00
Tad
71f838b5ba Fix notv placement 2017-08-11 21:03:13 -04:00
netblue30
b97ca53e7b added notv to most profiles 2017-08-11 10:21:18 -04:00
Tad
9e3ba319be Unify all profiles 2017-08-07 01:22:08 -04:00
Tad
5354f20012 Harden 50 profiles
Hardened many profiles using disable-mnt and novideo
Fixed gnome-font-viewer
2017-07-04 11:35:29 -04:00
announ
09ab9dcde0 Allow ~/.netrc for youtube-dl 2017-07-04 00:15:56 +00:00
netblue30
b53d02259e fix quiet in profiles 2017-06-08 15:00:27 -04:00
netblue30
dce9b9b9eb added /etc/firejail/globals.local for global customizations 2017-05-23 12:02:22 -04:00
Tad
0502ac9cb5 Harden some more profiles 2017-04-17 21:43:06 -04:00
Tad
f81611af58 Add a profile for youtube-dl 2017-04-16 10:22:26 -04:00