-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Double free or corruption when trying a remote execution #5562
Description
Steps to reproduce
I have a VM running, and I'm trying to execute a command remotely with the following command (from a bash shell). It never works (this is for a separate issue that I'll create later), but sometimes powershell even crashes
pwsh -Command - <<EOF
\$Username = '$VM_USER'
\$Password = '$VM_PASSWORD'
\$SecurePassword = ConvertTo-SecureString -AsPlainText \$Password -Force
\$Cred = New-Object System.Management.Automation.PSCredential -ArgumentList \$Username,\$SecurePassword
Invoke-Command -ComputerName $VM_IP -Credential \$Cred -Authentication Basic -Command { $VM_COMMAND }
EOFExpected behavior
The command runs on the remote Windows machine.
Actual behavior
Randomly (maybe once over 4 runs), powershell crashes with a double free. I ran this in strace so it might give a little more information. You'll find in the following attachements a core dump and the stack trace and memory map from the time the double free occured.
core.tar.gz
backtrace.txt.tar.gz
Environment data
I don't think it changes anything, but this is run from a Docker container based on ubuntu:xenial, the host system being a debian Jessie with a 4.9 kernel from the backports.
(yoann@freya) ~ » docker --version
Docker version 17.05.0-ce, build 89658be> $PSVersionTable
Name Value
---- -----
PSVersion 6.0.0-rc
PSEdition Core
GitCommitId v6.0.0-rc
OS Linux 4.9.0-0.bpo.4-amd64 #1 SMP Debian 4.9.51-1~bpo8+1 (2017-10-17)
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0 Please note that this works fine with at least v6.0.0-beta.9 and 6.0.0-beta.8-1.
If there is any additional steps I can do to help you find the problem, please let me know and i'll try to do them.