Repository navigation
Conversation
When SbieDll creates a process it derives the image name from a file handle (SbieDll_GetHandlePath), so the child's ImagePathName carries the on-disk spelling, while lpCommandLine is passed through and keeps the spelling the caller used. Ldr_FixImagePath() then writes that spelling into the LDR entry and into RTL_USER_PROCESS_PARAMETERS.ImagePathName. The two strings denote the same file and Windows treats them as equal, but applications that compare GetModuleFileName() against argv[0] case sensitively conclude that a file is missing. Chromium FilePath::AppendRelativePath() (base/files/file_path.cc) compares every component strictly and only exempts the drive letter. WeChat 4.x WeChatAppEx.exe is such a case: it fails to locate its flue.dll and exits with code 7, which breaks the notes and official account views inside the sandbox. When argv[0] is a drive absolute path that equals the boxed true path ignoring case, use its spelling instead. Everything else keeps the previous behaviour, so relative paths, short paths, symbolic links and forced processes are unaffected. The substituted string is identical apart from letter case, so no path redirection is possible.
|
@DavidXanatos |
haobinnan
reviewed
Nov 19, 2026
haobinnan
left a comment
There was a problem hiding this comment.
@DavidXanatos
It would be great if this patch could be merged into the main branch soon and make it into the next release. Thanks for your consideration!
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When SbieDll creates a process it derives the image name from a file handle (SbieDll_GetHandlePath), so the child's ImagePathName carries the on-disk spelling, while lpCommandLine is passed through and keeps the spelling the caller used. Ldr_FixImagePath() then writes that spelling into the LDR entry and into RTL_USER_PROCESS_PARAMETERS.ImagePathName.
The two strings denote the same file and Windows treats them as equal, but applications that compare GetModuleFileName() against argv[0] case sensitively conclude that a file is missing. Chromium FilePath::AppendRelativePath() (base/files/file_path.cc) compares every component strictly and only exempts the drive letter. WeChat 4.x WeChatAppEx.exe is such a case: it fails to locate its flue.dll and exits with code 7, which breaks the notes and official account views inside the sandbox.
When argv[0] is a drive absolute path that equals the boxed true path ignoring case, use its spelling instead. Everything else keeps the previous behaviour, so relative paths, short paths, symbolic links and forced processes are unaffected. The substituted string is identical apart from letter case, so no path redirection is possible.