sandboxie-plus / Sandboxie

Sandboxie Plus & Classic
https://Sandboxie-Plus.com
GNU General Public License v3.0
13.69k stars 1.52k forks source link

SandboxIE driver bug #1493

Closed aquila-XP closed 2 years ago

aquila-XP commented 2 years ago

I updated the program (Sandboxie Classic), version after version, since the new development. Starting with 5.55.4, the program no longer works on my machine. I have Windows 10 Enterprise 2015 LTSB 64-bit. I have no security software running in the background, except Windows Defender Engine Version: 1.1.18800.4. I did not changed the Sandboxie.ini configuration file. The last working version of Sandboxie Classic is 5.55.3. I tested the new versions (5.55.4-5.55.6) on another machine (Windows 10 Enterprise LTSC version 1809 64-bit) and they are working as usual. No issue encountered.

When I try to install the program (overwrite the existing installation), the setup is stuck to this step Extract: LICENSE.TXT. And a dialog box displays this message: Cannot create or update Sandboxie program files. Please make sure that Sandboxie Control is not running, and that no programs are running sandboxed. Then click OK to retry the installation. Otherwise click Cancel to abort the installation.

After I managed to finish the installation, I noticed the icon of the program with an exclamation mark in System Tray. When I right-clicked on it I get the following message: SBIE2331 Service start failed: [22 / 5] Access is denied.

Another error that I received is this: Failed to record configuration setting SbieCtrl_UserName in section Unknown: C0000080

isaak654 commented 2 years ago

Known issue: https://github.com/sandboxie-plus/Sandboxie/issues/686

aquila-XP commented 2 years ago

I managed to install the latest Classic version 5.55.6, when I uninstalled the old version and only after I rebooted the OS. The problem is with SbieDrv.sys. The driver file is not unloaded from memory. Even if I kill the service, I can't delete this file. Only after I reboot I can remove it. This did not happened before. Usually, when I updated the program and choose to overwrite the existing installation, I can use it immediately after, no reboot required. Since the Sandboxie Classic version 5.55.4 x64, the program is unusable for my machine (Windows 10 Enterprise 2015 LTSB 64-bit). The main issue is not with installing on uninstalling, but with the fact that the Sandboxie service does not start any more. I mentioned, on the bottom of the first comment, the error I get when I try to start the program manually.

Failed to record configuration setting SbieCtrl_UserName in section Unknown: C0000080

isaak654 commented 2 years ago

Since the Classic edition of Sandboxie doesn't provide a maintenance menu to handle the driver/service removal (unlike Plus), you may want to try the following commands on a cmd prompt in administrator mode and tell if you notice some difference:

KmdUtil.exe stop SbieSvc
KmdUtil.exe stop SbieDrv
KmdUtil.exe delete SbieSvc
KmdUtil.exe delete SbieDrv

KmdUtil is located on the main Sandboxie folder. Then reboot and try installing the newer version again.

The problem is with SbieDrv.sys. The driver file is not unloaded from memory. Even if I kill the service, I can't delete this file. Only after I reboot I can remove it. This did not happened before.

It already happened even before 5.55.4: https://github.com/sandboxie-plus/Sandboxie/issues/1353#issuecomment-961702394

Usually, when I updated the program and choose to overwrite the existing installation, I can use it immediately after, no reboot required.

I keep seeing random comments about errors fixed after install with a simple reboot (like in this case). Maybe it should be considered some mechanism to detect on the installer side if a reboot is needed after the install/upgrade process, especially if there is a possibility that could prevent issues like this one.

I also found out that the SbieCtrl_Username + SBIE2331 errors were mentioned in the old SBIE forum, so it's the same old story.

Another possible cause could be something related to Windows Update (this extract comes from an old 2013 topic):

SBIE2331 Service start failed: [22 / 5] Access is denied. [Sandboxie] Go to control panel -> uninstall a program view installed updates find the KB2813170 update and uninstall it re-install the sandboxie (make sure you reboot your pc after uninstalling sandboxie)

isaak654 commented 2 years ago

@aquila-XP Any news about this issue? If yes, how did you fix it precisely?

isaak654 commented 2 years ago

A fix will be deployed for the next build 1.0.7 / 5.55.7: - fixed KmdUtil sometimes not properly terminating the driver #1493

isaak654 commented 2 years ago

A more specific fix will be deployed to the next build 1.0.8 / 5.55.8: https://github.com/sandboxie-plus/Sandboxie/commit/130c43a62c9778b734fa625bf4f46b12d0701719

aquila-XP commented 2 years ago

I tested again in Windows 10 Enterprise 2015 LTSB 64-bit, the latest SandboxIE Classic versions 5.55.7 and 5.55.8. It's the same issue. The setup is stuck on the step Extract: LICENSE.TXT. Backup Sandboxie.ini file. Restart. Try again. The same issue. Uninstall. Restart. The process of installation works without issues. Pulsating icon of the program with an red exclamation mark in System Tray. error message SBIE2331 Service start failed: [22 / 5] Access is denied. Restart. Uninstall. Back to Sandboxie Classic x64 v5.55.3 - the last working version on Windows 10 Enterprise 2015 LTSB.

isaak654 commented 2 years ago

Did you try the KmdUtil commands mentioned above? (you never specified it earlier) You need to be located on the Sbie folder in order to run them correctly on a cmd prompt in administrator mode.

isaak654 commented 2 years ago

I would also be curious about what is holding you back from updating to Sandboxie Plus, if that's ok for you. That would help to know if you have the same issue on Plus 1.0.8.

wldhg commented 2 years ago

I'm suffering the same problem on Windows 11, on Sandboxie Plus 1.0.11 x64 version.

All gone right but after updating Windows (from build 22557 to 22563) it says the error as written above.

I tried reinstalling and restarting the service and driver, but it did not change the situation.

I also tried uninstalling SBIE with all configuration files and rebooting and installing SBIE again. But there was still an error "Failed to connect to the driver".

This can be a result from Windows development build, but I'm posting my case here because the symptom is similar.

isaak654 commented 2 years ago

All gone right but after updating Windows (from build 22557 to 22563) it says the error as written above. This can be a result from Windows development build, but I'm posting my case here because the symptom is similar.

@wldh-g A related fix is planned for the next build: https://github.com/sandboxie-plus/Sandboxie/commit/24c6ec751b503ae95714ba431e196f22ecd4f553

DavidXanatos commented 2 years ago

So whats the state on this did the fix resolved your win 11 issue?

wldhg commented 2 years ago

So whats the state on this did the fix resolved your win 11 issue?

Yes, it works! Thank you.