icsharpcode / ILSpy

.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
21.45k stars 3.35k forks source link

*** stack smashing detected ***: terminated zsh: abort ilspycmd #2254

Closed Guitar-Guy closed 3 years ago

Guitar-Guy commented 3 years ago

For Context im trying to build this on kali and followed the build instructions to the letter... tried to run it and then discovered issue How to launch #1478 and then get a stack smashing error... how can i fix this...

(root💀kali)-[~/reverse-engineering/ILSpy] └─# snap list
Name Version Rev Tracking Publisher Notes core18 20201210 1944 latest/stable canonical✓ base dotnet-runtime-21 2.1.23 28 latest/stable dotnetcore✓ - dotnet-sdk 3.1.404 104 3.1/stable dotnetcore✓ classic snapd 2.48.1 10492 latest/stable canonical✓ snapd

┌──(root💀kali)-[~/reverse-engineering/ILSpy] └─# dotnet build Frontends.sln

Welcome to .NET Core 3.1!

SDK Version: 3.1.404

Telemetry

The .NET Core tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry


Explore documentation: https://aka.ms/dotnet-docs Report issues and find source on GitHub: https://github.com/dotnet/core Find out what's new: https://aka.ms/dotnet-whats-new Learn about the installed HTTPS developer cert: https://aka.ms/aspnet-core-https Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs Write your first app: https://aka.ms/first-net-core-app

Microsoft (R) Build Engine version 16.7.1+52cd83677 for .NET Copyright (C) Microsoft Corporation. All rights reserved.

Determining projects to restore... Restored /root/reverse-engineering/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj (in 5.1 sec). Restored /root/reverse-engineering/ILSpy/ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj (in 8.6 sec). Restored /root/reverse-engineering/ILSpy/ICSharpCode.Decompiler.Console/ICSharpCode.Decompiler.Console.csproj (in 8.68 sec). fb8603e099c4b6951f1e695d286c17a4e056e599 ILSpyUpdateAssemblyInfo-1056594580 ICSharpCode.Decompiler -> /root/reverse-engineering/ILSpy/ICSharpCode.Decompiler/bin/Debug/netstandard2.0/ICSharpCode.Decompiler.dll ICSharpCode.Decompiler.PowerShell -> /root/reverse-engineering/ILSpy/ICSharpCode.Decompiler.PowerShell/bin/Debug/netstandard2.0/ICSharpCode.Decompiler.PowerShell.dll ICSharpCode.Decompiler.Console -> /root/reverse-engineering/ILSpy/ICSharpCode.Decompiler.Console/bin/Debug/netcoreapp2.1/ilspycmd.dll ICSharpCode.Decompiler.Console -> /root/reverse-engineering/ILSpy/ICSharpCode.Decompiler.Console/bin/Debug/netcoreapp3.1/ilspycmd.dll Successfully created package '/root/reverse-engineering/ILSpy/ICSharpCode.Decompiler.Console/bin/Debug/ilspycmd.7.0.0.6225-preview1.nupkg'.

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:16.24

┌──(root💀kali)-[~/reverse-engineering/ILSpy] └─# ls
appveyor.yml debugbuild.bat global.json ICSharpCode.Decompiler.PowerShell ILSpy.BamlDecompiler ILSpy.sln NuGet.config SharpTreeView azure-pipelines.yml DecompilerNuGetDemos.workbook ICSharpCode.Decompiler ICSharpCode.Decompiler.Tests ILSpy.BamlDecompiler.Tests ILSpy-tests packages.props TestPlugin BuildTools doc ICSharpCode.Decompiler.Console ILSpy ILSpy.Package ILSpy.Tests README.md clean.bat Frontends.sln ICSharpCode.Decompiler.PdbProvider.Cecil ILSpy.AddIn ILSpy.ReadyToRun ILSpy.WithPackage.sln releasebuild.bat

┌──(root💀kali)-[~/reverse-engineering/ILSpy] └─# cd ILSpy

┌──(root💀kali)-[~/reverse-engineering/ILSpy/ILSpy] └─# ls AboutPage.cs App.xaml.cs Commands Docking ILSpy.csproj Languages MainWindow.xaml.cs Options SolutionWriter.cs ViewModels Analyzers AssemblyList.cs ContextMenuEntry.cs EntityReference.cs ILSpySettings.cs LoadedAssembly.cs Metadata packages.config TaskHelper.cs Views app.config AssemblyListManager.cs Controls ExtensionMethods.cs ILSpyTraceListener.cs LoadedAssemblyExtensions.cs NativeMethods.cs Properties TextView app.manifest AvalonEdit DebugInfo FilterSettings.cs Images LoadedPackage.cs NavigationHistory.cs Search themes App.xaml CommandLineArguments.cs DecompilationOptions.cs GuessFileType.cs ISmartTextOutput.cs MainWindow.xaml NavigationState.cs SessionSettings.cs TreeNodes

┌──(root💀kali)-[~/reverse-engineering/ILSpy/ILSpy] └─# ILSpy zsh: command not found: ILSpy

┌──(root💀kali)-[~/reverse-engineering/ILSpy/ILSpy] └─# cd .. 127 ⨯

┌──(root💀kali)-[~/reverse-engineering/ILSpy] └─# ls appveyor.yml debugbuild.bat global.json ICSharpCode.Decompiler.PowerShell ILSpy.BamlDecompiler ILSpy.sln NuGet.config SharpTreeView azure-pipelines.yml DecompilerNuGetDemos.workbook ICSharpCode.Decompiler ICSharpCode.Decompiler.Tests ILSpy.BamlDecompiler.Tests ILSpy-tests packages.props TestPlugin BuildTools doc ICSharpCode.Decompiler.Console ILSpy ILSpy.Package ILSpy.Tests README.md clean.bat Frontends.sln ICSharpCode.Decompiler.PdbProvider.Cecil ILSpy.AddIn ILSpy.ReadyToRun ILSpy.WithPackage.sln releasebuild.bat

┌──(root💀kali)-[~/reverse-engineering/ILSpy] └─# dotnet run ILSpy.sln
Couldn't find a project to run. Ensure a project exists in /root/reverse-engineering/ILSpy, or pass the path to the project using --project.

┌──(root💀kali)-[~/reverse-engineering/ILSpy] └─# dotnet run ILSpy.sln 1 ⨯ Couldn't find a project to run. Ensure a project exists in /root/reverse-engineering/ILSpy, or pass the path to the project using --project.

┌──(root💀kali)-[~/reverse-engineering/ILSpy] └─# dotnet run ILSpy 1 ⨯ Couldn't find a project to run. Ensure a project exists in /root/reverse-engineering/ILSpy, or pass the path to the project using --project.

┌──(root💀kali)-[~/reverse-engineering/ILSpy] └─# dotnet tool install ilspycmd -g 1 ⨯ Tools directory '/root/.dotnet/tools' is not currently on the PATH environment variable. If you are using bash, you can add it to your profile by running the following command:

cat << \EOF >> ~/.bash_profile

Add .NET Core SDK tools

export PATH="$PATH:/root/.dotnet/tools" EOF

You can add it to the current session by running the following command:

export PATH="$PATH:/root/.dotnet/tools"

You can invoke the tool using the following command: ilspycmd Tool 'ilspycmd' (version '6.2.0.6124') was successfully installed.

┌──(root💀kali)-[~/reverse-engineering/ILSpy] └─# ilspycmd zsh: command not found: ilspycmd

┌──(root💀kali)-[~/reverse-engineering/ILSpy] └─# nano /etc/environment 127 ⨯

┌──(root💀kali)-[~/reverse-engineering/ILSpy] └─# source /etc/environment

┌──(root💀kali)-[~/reverse-engineering/ILSpy] └─# ilspycmd
stack smashing detected : terminated zsh: abort ilspycmd

┌──(root💀kali)-[~/reverse-engineering/ILSpy]

siegfriedpammer commented 3 years ago

This looks like a general .NET Core issue on Kali Linux... not sure how we might be able to help you.

siegfriedpammer commented 3 years ago

I just tried this in a Kali Linux virtual machine:

$ uname -a
Linux kali 5.9.0-kali1-amd64 #1 SMP Debian 5.9.1-1kali2 (2020-10-29) x86_64 GNU/Linux

using https://dot.net/v1/dotnet-install.sh I was able to download .NET Core 3.1.404 cloned the ILSpy repo and ran dotnet build Frontends.sln after setting DOTNET_ROOT properly, I was able to run ilspycmd...

siegfriedpammer commented 3 years ago

Sorry, cannot repro this... I advise you to open an issue at https://github.com/dotnet/runtime/ Thanks!