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

Can't find libstdc++.so.6 due to private-etc and private-lib in aria2c.profile #4589

Closed
crocket opened this issue Oct 5, 2021 · 5 comments · Fixed by #4643
Closed

Can't find libstdc++.so.6 due to private-etc and private-lib in aria2c.profile #4589

crocket opened this issue Oct 5, 2021 · 5 comments · Fixed by #4643

Comments

@crocket
Copy link
Contributor

crocket commented Oct 5, 2021

Description

This aria2c.local file works around the issue

private-etc ld.so.cache
ignore private-lib

private-lib eliminates /usr/lib/gcc by mounting tmpfs on /usr/lib.
/etc/ld.so.cache is necessary for finding libstdc++.so.6 in /usr/lib/gcc.

Environment

  • Linux distribution and version // Gentoo Linux
  • Firejail version (firejail --version).
firejail --version
firejail version 0.9.66

Compile time support:
        - always force nonewprivs support is disabled
        - AppArmor support is enabled
        - AppImage support is enabled
        - chroot support is enabled
        - D-BUS proxy support is enabled
        - file and directory whitelisting support is enabled
        - file transfer support is enabled
        - firetunnel support is disabled
        - networking support is enabled
        - output logging is enabled
        - overlayfs support is disabled
        - private-home support is enabled
        - private-cache and tmpfs as user enabled
        - SELinux support is disabled
        - user namespace support is enabled
        - X11 sandboxing support is enabled
@rusty-snake
Copy link
Collaborator

ignore private-lib

We have private-lib …,gcc/*/*/libstdc++.so.*,… already in other profiles, maybe we should just hardcode it?

private-etc ld.so.cache

to sum up:

  • always necessary: alternatives,ld.so.cache,ld.so.preload
  • always necessary if there is no net none: ca-certificates,crypto-policies,nsswitch.conf,pki,resolv.conf,ssl
    • crypto-policies,pki,ssl can be future restricted to use subdirs

@crocket
Copy link
Contributor Author

crocket commented Oct 5, 2021

Perhaps, you could put those in something like /etc/firejail/globals.inc and put include globals.inc in every profile in /etc/firejail?

@rusty-snake
Copy link
Collaborator

Nope, because not every profiles uses private-etc. I solved this in my overrides with include private-etc:net.inc. Anyway we need private-etc groups like for seccomp (private-etc @network,fonts,...). cloudn't find the issue for it

@crocket
Copy link
Contributor Author

crocket commented Oct 5, 2021

Perhaps, something like this in /etc/firejail/globals.inc can work.

?HAS_PRIVATE_ETC: private-etc alternatives,ld.so.cache,ld.so.preload

@rusty-snake rusty-snake linked a pull request Oct 28, 2021 that will close this issue
@crocket
Copy link
Contributor Author

crocket commented Oct 29, 2021

I don't think testing profiles is the definite solution because people are going to have private profiles that are not subject to tests.

People will still keep submitting profiles without required files, and you will have to explain every time. That's why it's not the definite solution.

The solution would eradicate the possibility of a wrong profile. Perhaps, private-etc should implicitly add required files, and man page should explain private-etc automatically adds required files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants