-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Excessive permissions on /tmp/VBCSCompiler #61900
Comments
@danmoseley I'm a bit confused. Which file or folder has incorrect permissions? When I tried this, I created a folder ( |
Do you see Conversely perms of anything in your |
Thanks for clarifying @danmoseley :-) |
Thanks. Yes, as I understand it /tmp (or $TMPDIR if set -- Path.GetTempPath() will get it right) is the right place even for stuff that's specific to a user, but as noted, the onus becomes on us to ensure that it's only readable by that user. https://github.com/dotnet/runtime/blob/main/docs/design/security/unix-tmp.md |
@danmoseley why did you assign this to the roslyn repo? That directory is created as an implementation detail of the |
Hmm, I didn't realize that. (Wouldn't it have a CoreFXPipe_ prefix though? https://github.com/dotnet/runtime/blob/7e213b3816d60686169b97969016acd21d62802b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Unix.cs#L33) Feel free to transfer back if it's not Roslyn responsible for this. |
Roslyn specifies the prefix, but I'm not sure who's responsible for the permissions: https://sourceroslyn.io/#VBCSCompiler/NamedPipeUtil.cs,24 |
@jaredpar looks like there's more than just the named pipe stuff in here though. Idk what it is (what's the AnalyzerAssemblyLoader directory?) |
That is the directory we copy analzyer / generator assemblies to in order to do fake shadow loading. |
compiler no longer uses temp directories on Linux as we use |
Repro.
dotnet new console
Result:
Here the VBCSCompiler access mask is 0755. Can this be 0700?
Similarly for some of the contents, eg
(Context: we discovered we are inconsistent with perms we apply on files and directories we write to /tmp. @agocke made a first start at writing down guidance and I'm opening bugs. I'm assuming we'll discover places we need to adjust the guidance.)
The text was updated successfully, but these errors were encountered: