-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Some issues about symbolic link folders/junctions #1396
Comments
i think the issue is releated to #1409 and I'll take a look into it soon |
I suspect this may be a specific issue introduced in 1.0.0 not generally related to symlinks, please test if adding UseRuleSpecificity=y to your sandbox resolved the issue you have with the latest build |
I can reproduce the general issue with the batch file. What Am i doing wrong? Also there were a coupel related fixes in teh recent build 1.0.8 could you please test if 1.0.8 works for you usecase, the batch file still fails but I'm working on it. |
I think i found the issue, the batch file wil work correctly with the 1.0.9 build, also it will be possible to create junktions also from within sandboxie |
@DavidXanatos Many thanks for all the hard work! |
the test batch file now works as it should. can you craft a step by step guide for me how to reproduce the issue? |
➜ #1345 When the sandbox is empty and Firefox Portable is launched like this, it runs sandboxed like expected, but addons do not load in Firefox Portable upon the 1st launch. Close-restart Firefox Portable fixes it, temporarily until after the sandbox is emptied. (I use only addons that appear on Mozilla's list of Recommended addons like uBlock Origin, Dark Reader, Tabliss, all of which are known to be reliable so you know the issue is not caused by them.) Where this gets interesting is that, next, launching Firefox Portable UNSANDBOXED (i.e. directly from "C:\FirefoxPortable\FirefoxPortable.exe" instead of "C:\FirefoxPortable - sandboxed\FirefoxPortable\FirefoxPortable.exe") now causes a similar issue, of having to close-restart Firefox Portable UNSANDBOXED. Clearly, this behavior is undeniable evidence that launching Firefox Portable SANDBOXED has caused a file to get modified OUTSIDE the sandbox. So, this must be a security bug in Sandboxie-Plus, and, I first discovered this bug at least 5 months ago (and have spent at least 2 months to verify that the bug is real, not caused by some other chain of possible events and that could have been unrelated to Sandboxie-Plus...). |
mmh... and if you don't use a junction everything works fine? |
Yeah. |
I cant reproduce the issue right now, also it has an own thread so I'll close this and mark as fixed as the test bat provided for this issue wi now workign properly. and we contile looking into this the otehr issue in its own issue |
I have a program that relies on a folder at a specific location,
D:\User\Documents\Data
for example. However, I decided to move the folderData
intoD:\User
, so I moved it and created a symbolic linkD:\User\Documents\Data
which points toD:\User\Data
so that the program can still use that folder using the old paths. Also, I want that program to have direct access to that folder, so I added anOpenPipePath=D:\User\Data
rule as well. (The program was installed in the sandbox)This worked fine, until I installed the v1.0 version and the program started complaining that
D:\User\Documents\Data
cannot be accessed.After some simple tests, I found that if I try to create a file in
D:\User\Documents\Data
inside the sandbox environment, I will get a "file not found" error and the file will not be created. If I try to create the file inD:\User\Data
then it will be fine. After I reinstalled the older v0.9.8d version, this issue disappeared. Also ifD:\User\Data
is not anOpenPipePath
orOpenFilePath
this will work correctly, putting the created file in the target folder (or, the sandbox location for the target folder).Then I did some more tests. Results showed that the older version, v0.9.8d, also processes some symbolic links incorrectly. I wrote a batch file(.bat) to test it.
Batch file
First put this batch script inside an empty folder, run it outside the sandbox, then press 'M' to build the directory structure where there's one target folder and several symbolic links (these are junctions actually) pointing to the same folder but are in different folder levels. After that, press 'Q' to quit, and relaunch it inside a sandbox. This time press 'F', '0', '1', '2', or 'L' to let it create test files in different ways.
I noticed that if the file is created with a full path to a symbolic link folder, it will be put correctly in the target folder. But if the file is created with a relative path, Sandboxie will sometimes think that the symbolic link folder is an actual folder, then create a corresponding sandbox folder for the symbolic link and put the created file in that folder.
For example, the target folder is
D:\Folder\Target
and the link isD:\Folder\Link
, and the sandbox folder isD:\Sandbox\TestSymLink
. When I try to create a file inD:\Folder\Link
with a relative path, sometimes the file will be created inD:\Sandbox\TestSymLink\drive\D\Folder\Link
.I also noticed that if the path is a relative path, but it contains
..
, then the file will be put in the correct location.That behavior reminds me of the
OBJECT_ATTRIBUTES
structure. When I'm opening a file with a relative path, most likely I will get anOBJECT_ATTRIBUTES
structure withRootDirectory
set to a handle to the current working directory andObjectName
set to the relative path. But if the path is absolute or if the relative path begins with..
, thenRootDirectory
will be NULL andObjectName
will contain the full path. Not sure if this is related to the behavior though.The text was updated successfully, but these errors were encountered: