-
Notifications
You must be signed in to change notification settings - Fork 546
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SpawningKit: sanity-check Unix domain socket addresses reported by th…
…e app If apps can report arbitrary Unix domain socket filenames then they can make Passenger connect to (and forward traffic to) arbitrary sockets. That probably isn't problematic but we don't want to allow it just to be safe. A more important issue is this: if any of the parent directories of the socket is writable by a normal user (Joe) that is not the app's user (Jane), then Joe can swap that directory with something else, with contents controlled by Joe. That way, Joe can cause Passenger to connect to (and forward Jane's traffic to) a process that does not actually belong to Jane. We mitigate these issues with extra permission checks, and by insisting that any sockets must be created inside the instance directory's app.s subdirectory.
- Loading branch information
1 parent
a346e7c
commit 3f270a9
Showing
3 changed files
with
172 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters