mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3787] [Question] Can an app read the username of the user's home dir on linux? #2391
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#2391
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 @svc88 on GitHub (Dec 3, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3787
If an app wanted to, could it read the username of the homedir that it for example uses to store app data? I assume it can
I ask this because if a user for example has Skype, Telegram, Discord etc.. but the user has multiple accounts on an app like these and wants to switch between them by renaming the active data dir, the app can then potentially link all switched accounts, since it could read the username from the homedir path that it uses for its data dir.
Having taken into account other security measures to ensure that the app runs through a tor bridge, etc. My question only relates to the homedir username that the app can link to. Can firejail already somehow "mask" the username so that the app does not see it? Or is there a possibility that this could or should become a feature?
@SkewedZeppelin commented on GitHub (Dec 3, 2020):
Yes, it can.
And it can also read your environment variables.
If you need such isolation between identities I'd suggest using virtualization
or Qubes OS.
@rusty-snake commented on GitHub (Dec 4, 2020):
Actually
/etc/machine-idis much more unique then a username.@svc88 commented on GitHub (Dec 14, 2020):
Cant you blacklist this specific file from being read?
@rusty-snake commented on GitHub (Dec 14, 2020):
You can
blacklist /etc/machine-idor spoofmachine-id. However, sound will be broken.An app on your system can also match IP (e.g. 1.2.3.4) + OS (linux) + UID (e.g. 1000) + HW details (e.g 8GB RAM, Intel CPU, AMD GPU, ...), which will be quite unique too.
@svc88 commented on GitHub (Dec 14, 2020):
I did:
Then i tried sound on one of the apps, it still worked until i restarted the app then sound stopped working. However its better running these cmd's just before you're about to reboot PC. My question now is, would it help or be ok to keep re-generating a new id before every reboot?
Am aware of Qubes, but wondering if there is a way to spoof the username in the path too, just out of interest.
@rusty-snake commented on GitHub (Dec 14, 2020):
I think systemd-machine-id-setup will generate a new one if delete it on shut down. However, as I pointed in my comment above, there are hundred ways for a app to link accounts if it wants.
@rusty-snake commented on GitHub (Jan 4, 2021):
I'm closing here due to inactivity, please fell free to request to reopen if you have more questions.