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

Tighten security #742

Merged
merged 4 commits into from
Aug 24, 2016
Merged

Tighten security #742

merged 4 commits into from
Aug 24, 2016

Conversation

manevich
Copy link
Contributor

@manevich manevich commented Aug 24, 2016

appimage.c:

  • remove redundant mkdir, chown, chmod calls, last two also pose race condition risk.
  • open appimage file as user, to avoid race condition, that may alllow attacker mount appimage/iso file that unreadable to user.

firejail.h:

  • add ASSERT_PERMS macros

util.c:

  • change copy_file function to take uid, gid, and mode for new file, use fchown and fchmod to prevent race condition when setting owner and permissions.

euid_common.h:

  • set egid when switching euid, so files created as root won't need additional chown to change group.
  • exit with error if unable to switch euid/egid to user - if we continue to run code than intended to run as user with root privileges - this is disaster.

fs.c and other:

  • Avoid chown and chmod where possible, using functions and macros mentioned above.

@netblue30 netblue30 merged commit 75e48b2 into netblue30:master Aug 24, 2016
@netblue30
Copy link
Owner

Merged, thanks.

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 this pull request may close these issues.

2 participants