-
Notifications
You must be signed in to change notification settings - Fork 566
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
win7 x32 ERROR: unable to inject: exec of |(null)| failed #5512
Comments
C:\dynamorio-release_9.0.1\build32>bin32\drrun.exe -verbose -64 notepad.exe i copy lib32 to lib64 C:\dynamorio-release_9.0.1\build32>bin32\drrun.exe -verbose -64 notepad.exe |
Can you use the full path to the 32-bit version |
Is this a duplicate of #5384? |
Please provide more information. Github is not supposed to let you file a blank issue: it is supposed to give you this template https://github.com/DynamoRIO/dynamorio/issues/new?assignees=&labels=&template=bug_report.md&title= Please provide the information requested in the template, especially the DR version: is this a custom build? And you only built the 32-bit DR? And you're trying to run the 64-bit notepad with the 32-bit DR with no 64-bit build of DR around? That would be expected to fail, right? I thought there were some error messages about bitwidth mismatches but maybe the path search bypasses them. If you'd like to look at the drdeploy.c sources and add better error messages and send a pull request that would be appreciated. |
Env:win7 x32 |
build step:
|
@derekbruening Environment / tested version
Observations
Executed commandsInjection fails: # Run included version
## 64 bit
- C:\UserProgs\DynamoRIO-Windows\bin64\drrun.exe -verbose -- git --version ; $True
- C:\UserProgs\DynamoRIO-Windows\bin64\drrun.exe -verbose -debug -loglevel 4 -- git --version ; $True
## 32 bit
- C:\UserProgs\DynamoRIO-Windows\bin32\drrun.exe -verbose -- dot -V ; $True
- C:\UserProgs\DynamoRIO-Windows\bin32\drrun.exe -verbose -debug -loglevel 4 -- dot -V ; $True
# Get-FileHash
- Get-FileHash C:\UserProgs\DynamoRIO-Windows\lib64\debug\dynamorio.dll
- Get-FileHash C:\UserProgs\DynamoRIO-Windows\lib64\release\dynamorio.dll
- Get-FileHash C:\UserProgs\DynamoRIO-Windows\lib32\debug\dynamorio.dll
- Get-FileHash C:\UserProgs\DynamoRIO-Windows\lib32\release\dynamorio.dll
# Run included version
## 64 bit
- C:\UserProgs\DynamoRIO-Windows\bin64\drrun.exe -verbose -- git --version ; $True
- C:\UserProgs\DynamoRIO-Windows\bin64\drrun.exe -verbose -debug -loglevel 4 -- git --version ; $True
## 32 bit
- C:\UserProgs\DynamoRIO-Windows\bin32\drrun.exe -verbose -- dot -V ; $True
- C:\UserProgs\DynamoRIO-Windows\bin32\drrun.exe -verbose -debug -loglevel 4 -- dot -V ; $True
# Print version
- C:\UserProgs\DynamoRIO-Windows\bin64\drrun.exe -version Output
Injection works when executing # Get-FileHash
- Get-FileHash C:\UserProgs\DynamoRIO-Windows\lib64\debug\dynamorio.dll
- Get-FileHash C:\UserProgs\DynamoRIO-Windows\lib64\release\dynamorio.dll
- Get-FileHash C:\UserProgs\DynamoRIO-Windows\lib32\debug\dynamorio.dll
- Get-FileHash C:\UserProgs\DynamoRIO-Windows\lib32\release\dynamorio.dll
# Run included version
## 64 bit
- C:\UserProgs\DynamoRIO-Windows\bin64\drrun.exe -verbose -- git --version ; $True
- C:\UserProgs\DynamoRIO-Windows\bin64\drrun.exe -verbose -debug -loglevel 4 -- git --version ; $True
## 32 bit
- C:\UserProgs\DynamoRIO-Windows\bin32\drrun.exe -verbose -- dot -V ; $True
- C:\UserProgs\DynamoRIO-Windows\bin32\drrun.exe -verbose -debug -loglevel 4 -- dot -V ; $True
# Print version
- C:\UserProgs\DynamoRIO-Windows\bin64\drrun.exe -version Output
Using late injection: # Run included version (late injection)
## 64 bit
- C:\UserProgs\DynamoRIO-Windows\bin64\drrun.exe -verbose -late -- git --version ; $True
- C:\UserProgs\DynamoRIO-Windows\bin64\drrun.exe -verbose -late -debug -loglevel 4 -- git --version ; $True
## 32 bit
- C:\UserProgs\DynamoRIO-Windows\bin32\drrun.exe -verbose -late -- dot -V ; $True
- C:\UserProgs\DynamoRIO-Windows\bin32\drrun.exe -verbose -late -debug -loglevel 4 -- dot -V ; $True
# The following normal injections still fail
## 64 bit
- C:\UserProgs\DynamoRIO-Windows\bin64\drrun.exe -verbose -- git --version ; $True
- C:\UserProgs\DynamoRIO-Windows\bin64\drrun.exe -verbose -debug -loglevel 4 -- git --version ; $True
## 32 bit
- C:\UserProgs\DynamoRIO-Windows\bin32\drrun.exe -verbose -- dot -V ; $True
- C:\UserProgs\DynamoRIO-Windows\bin32\drrun.exe -verbose -debug -loglevel 4 -- dot -V ; $True
# Print version
- C:\UserProgs\DynamoRIO-Windows\bin64\drrun.exe -version Output
Download and unpack DynamoRIO during run: # Download and unpack during run instead of build
- (New-Object System.Net.WebClient).DownloadFile("${BASE_URL}/DynamoRIO-Windows-${DYNAMORIO_VERSION}.zip", 'C:\temp\DynamoRIO-Windows.zip')
- Expand-Archive C:\temp\DynamoRIO-Windows.zip C:\UserProgs
- Move-Item "C:\UserProgs\DynamoRIO-Windows-${DYNAMORIO_VERSION}" C:\UserProgs\DynamoRIO-Windows-fresh
# Run fresh unpacked version
## 64 bit
- C:\UserProgs\DynamoRIO-Windows-fresh\bin64\drrun.exe -verbose -- git --version ; $True
- C:\UserProgs\DynamoRIO-Windows-fresh\bin64\drrun.exe -verbose -debug -loglevel 4 -- git --version ; $True
## 32 bit
- C:\UserProgs\DynamoRIO-Windows-fresh\bin32\drrun.exe -verbose -- dot -V ; $True
- C:\UserProgs\DynamoRIO-Windows-fresh\bin32\drrun.exe -verbose -debug -loglevel 4 -- dot -V ; $True
# Print version
- C:\UserProgs\DynamoRIO-Windows-fresh\bin64\drrun.exe -version Output
|
I can confirm strange Windows Container / Docker behavior on both Directly from container layerINFO: default root: C:\app\DynamoRIO INFO: default toolconfig dir: C:\app\DynamoRIO/tools INFO: client 0 path: c:\app\build32\bin\Release\winafl.dll INFO: targeting application: "C:\pwd\harness.exe" INFO: app cmdline: "C:\pwd\harness.exe" "C:\pwd\inputs\02.txt" INFO: configuration directory is "C:\Users\ContainerAdministrator/dynamorio" INFO: created child with pid 9032 for C:\pwd\harness.exe WARNING: c:\app\build32\bin\Release\winafl.dll does not exist INFO: registering client with id=0 path=|c:\app\build32\bin\Release\winafl.dll| ops=|"-debug" "-target_module" "harness.exe" "-coverage_module" "C:\pwd\bma\bfc.dll" "-target_method" "fuzzme" "-fuzz_iterations" "1000" "-nargs" "2"| INFO: waiting forever for app to exit... <Application C:\pwd\harness.exe (9032). Unable to load client library: c:\app\build32\bin\Release\winafl.dll Cannot find library.> <Application C:\pwd\harness.exe (9032). Unable to load client library: c:\app\build32\bin\Release\winafl.dll. Error opening instrumentation library c:\app\build32\bin\Release\winafl.dll: .> Copied layer to volumeINFO: default root: C:\pwd\DynamoRIO INFO: default toolconfig dir: C:\pwd\DynamoRIO/tools INFO: client 0 path: C:\pwd\WinAFL\build32\bin\Release\winafl.dll INFO: targeting application: "C:\pwd\harness.exe" INFO: app cmdline: "C:\pwd\harness.exe" "C:\pwd\inputs\02.txt" INFO: configuration directory is "C:\Users\ContainerAdministrator/dynamorio" INFO: created child with pid 9076 for C:\pwd\harness.exe INFO: registering client with id=0 path=|C:\pwd\WinAFL\build32\bin\Release\winafl.dll| ops=|"-debug" "-target_module" "harness.exe" "-coverage_module" "C:\pwd\bma\bfc.dll" "-target_method" "fuzzme" "-fuzz_iterations" "1000" "-nargs" "2"| INFO: waiting forever for app to exit... |
env:
win7 sp1 x32
cmd:
C:\dynamorio-release_9.0.1\build32>bin32\drrun.exe notepad.exe
ERROR: unable to inject: exec of |(null)| failed
The text was updated successfully, but these errors were encountered: