Skip to content
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

Golang Cmd.Run() doesn't return when running in Sandboxie #4538

Open
hbzhang3 opened this issue Feb 28, 2025 · 0 comments
Open

Golang Cmd.Run() doesn't return when running in Sandboxie #4538

hbzhang3 opened this issue Feb 28, 2025 · 0 comments
Labels
Confirmation Pending Further confirmation is requested

Comments

@hbzhang3
Copy link

Describe what you noticed and did

Following Golang app launches notepad.exe and wait for it to exit. When running in Sandboxie, cmd.Run() does not return even though notepad.exe is closed.

func main() {
	cmd := exec.Command("notepad.exe")

	var out bytes.Buffer
	cmd.Stdout = &out  // it works fine without this line

	// Execute the command
	err := cmd.Run()
	if err != nil {
		return
	}
}

if i remove the line cmd.Stdout =...., it works fine.

How often did you encounter it so far?

always

Expected behavior

it should close immediately after closing notepad

Affected program

Golang app

Download link

https://1drv.ms/u/c/01cff2ee4af3350f/EfNuYnUxSrNPorLVndgOqK0BRs4_ZsK3lRZGhs663322Dg?e=nMeC7d

Where is the program located?

The program is installed only outside the sandbox.

Did the program or any related process close unexpectedly?

No, not at all.

Crash dump

No response

What version of Sandboxie are you running now?

Sandboxie Plus 1.15.7

Is it a new installation of Sandboxie?

I recently did a new clean installation.

Is it a regression from previous versions?

no

In which sandbox type you have this problem?

In a standard isolation sandbox (yellow sandbox icon).

Can you reproduce this problem on a new empty sandbox?

I can confirm it also on a new empty sandbox.

What is your Windows edition and version?

Windows 10 22H2

In which Windows account you have this problem?

A local account (Standard user).

Please mention any installed security software

No

Did you previously enable some security policy settings outside Sandboxie?

no

Trace log

No response

Sandboxie.ini configuration

#
# Sandboxie configuration file
#

[GlobalSettings]
Template=7zipShellEx
Template=Edge_Fix
Template=OfficeClickToRun
Template=OfficeLicensing
Template=WindowsLive
Template=WindowsRasMan

[UserSettings_0BFE0204]
SbieCtrl_AutoStartAgent=SandMan.exe -autorun
BoxGrouping=:DefaultBox
SbieCtrl_EnableAutoStart=y

[DefaultBox]
Enabled=y
BlockNetworkFiles=y
RecoverFolder=%{374DE290-123F-4565-9164-39C4925E467B}%
RecoverFolder=%Personal%
RecoverFolder=%Desktop%
BorderColor=#00FFFF,ttl
Template=OpenBluetooth
Template=SkipHook
Template=FileCopy
Template=qWave
Template=BlockPorts
Template=LingerPrograms
Template=AutoRecoverIgnore
ConfigLevel=10
@hbzhang3 hbzhang3 added the Confirmation Pending Further confirmation is requested label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Confirmation Pending Further confirmation is requested
Projects
None yet
Development

No branches or pull requests

1 participant