ssh plugin crashing when typing text
❗ The Remmina project is looking for new maintainers, and it's not actively updated.
Make sure the problem exists on the first,
and keep trying to reproduce it on any later versions :)
- Reporting back greatly increases the attention and hope of fixing your issue.
Do not use Gitlab for support requests, you can ask questions on:
- IRC, on libera.chat, in the #remmina channel, or use a web client.
- Matrix
- Reddit :(
For enhancement requests select the proper Issue template in the above drop-down box.
Problem Description
Remmina 1.4.29 crashes when SSH is used to connect to a server and the first keystroke is sent. Platform is FreeBSD where remmina works without need of any patches or modifications.
What is the expected correct behavior?
Symbols typed in the keyboard are echoed and show in the screen.
Remote System Description
- Server (OS name and version): FreeBSD 13.1 amd64
- Special notes regarding the remote system (i.e. gateways, tunnel, etc.):
Relevant logs and/or screenshots
This is a stack trace obtained from a remmina
running process attached to gdb
:
Thread 53 received signal SIGSEGV, Segmentation fault.
Invalid permissions for mapped object.
[Switching to LWP 101845 of process 1657]
0x00000000002c8e96 in remimna_ssh_cp_to_ch_cb (fd=<error reading variable: Cannot access memory at address 0x7fffdf3f7e58>, revents=<error reading variable: Cannot access memory at address 0x7fffdf3f7e54>, userdata=<error reading variable: Cannot access memory at address 0x7fffdf3f7e48>) at /wrkdirs/usr/ports/net/remmina/work-default/Remmina-9d409a3556c8c2759a376b4f4ac5149db7aacf4f/src/remmina_ssh.c:478
478 /wrkdirs/usr/ports/net/remmina/work-default/Remmina-9d409a3556c8c2759a376b4f4ac5149db7aacf4f/src/remmina_ssh.c: No such file or directory.
(gdb) info threads
Id Target Id Frame
1 LWP 100789 of process 1657 0x0000000800b72db8 in ?? () from /usr/local/bin/../lib/libgtk-3.so.0
2 LWP 101794 of process 1657 "pool-spawner" 0x0000000801b1db6c in ?? () from /lib/libthr.so.3
3 LWP 101795 of process 1657 "gmain" 0x0000000801c7663a in _poll () from /lib/libc.so.7
4 LWP 101796 of process 1657 "gdbus" 0x0000000801c7663a in _poll () from /lib/libc.so.7
* 53 LWP 101845 of process 1657 0x00000000002c8e96 in remimna_ssh_cp_to_ch_cb (
fd=<error reading variable: Cannot access memory at address 0x7fffdf3f7e58>,
revents=<error reading variable: Cannot access memory at address 0x7fffdf3f7e54>,
userdata=<error reading variable: Cannot access memory at address 0x7fffdf3f7e48>)
at /wrkdirs/usr/ports/net/remmina/work-default/Remmina-9d409a3556c8c2759a376b4f4ac5149db7aacf4f/src/remmina_ssh.c:478
(gdb) bt
#0 0x00000000002c8e96 in remimna_ssh_cp_to_ch_cbPython Exception <class 'gdb.MemoryError'>: Cannot access memory at address 0x7fffdf3f7e58
(fd=#1 0x00000008013c8737 in () at /usr/local/bin/../lib/libssh.so.4
#2 0x00000000002c6b20 in remmina_ssh_shell_thread (data=0x80be32000)
at /wrkdirs/usr/ports/net/remmina/work-default/Remmina-9d409a3556c8c2759a376b4f4ac5149db7aacf4f/src/remmina_ssh.c:2993
#3 0x0000000801b2083a in () at /lib/libthr.so.3
#4 0x0000000000000000 in ()
Running remmina
under valgrind
shows the following message right after crashing:
==2408== Warning: client switching stacks? SP change: 0x7db5fae70 --> 0x7db3fae20
==2408== to suppress, use: --max-stackframe=2097232 or greater
And the culprit is this 2 MB buffer (that is roughly the stack smashing size 0x7db3fae20 - 0x7db5fae70):
gchar buf[0x200000];
in remmina_ssh.c
.
Reducing this buffer to 524288
(512 KB) fixes the problem and does not complain in valgrind
. We've locally patched remmina
in our ports collection.
Before that I tried to run remmina
with bigger stacks to no avail. I think this might be related to -fstack-protector-strong
but I'm not sure.
Debugging documentation
Please see Remmina debugging
Local System Description
-
Client (OS name and version): FreeBSD 13.1-RELEASE-p3 FreeBSD 13.1-RELEASE-p3 GENERIC amd64
-
Remmina version (
remmina --version
): org.remmina.Remmina - 1.4.29 (git n/a) -
Installation(s):
-
Distribution package. -
PPA. -
Snap. -
Flatpak. -
Compiled from sources. -
Other - detail:
-
-
Desktop environment (GNOME, Unity, KDE, ..):
-
Plugin(s):
-
RDP - freerdp version ( xfreerdp --version
): -
VNC -
SSH -
SFTP -
SPICE -
WWW -
EXEC -
Other (please specify):
-
-
GTK back-end (Wayland, Xorg): Xorg
-
Optional: Include the output of the following commands at the end of this text:
remmina --full-version
** Message: 13:47:12.847: Remmina does not log all output statements. Turn on more verbose output by using "G_MESSAGES_DEBUG=all" as an environment variable.
More info available on the Remmina wiki at:
https://gitlab.com/Remmina/Remmina/-/wikis/Usage/Remmina-debugging
Load modules from /usr/local/lib/remmina/plugins
Remmina plugin glibsecret (type=Secret) has been registered, but is not yet initialized/activated. The initialization order is 2000.
The glibsecret secret plugin has been initialized and it will be your default secret plugin
org.remmina.Remmina - 1.4.29 (git n/a)
NAME TYPE DESCRIPTION PLUGIN AND LIBRARY VERSION
EXEC Protocol Execute a command 1.0
RDP Protocol RDP - Remote Desktop Protocol RDP plugin: 1.4.29 (Git n/a), Compiled with libfreerdp 2.10.0 (2.10.0), Running with libfreerdp 2.9.0 (rev 2.9.0), H.264 No
RDPF File RDP - RDP File Handler RDP plugin: 1.4.29 (Git n/a), Compiled with libfreerdp 2.10.0 (2.10.0), Running with libfreerdp 2.9.0 (rev 2.9.0), H.264 No
RDPS Preference RDP - Preferences RDP plugin: 1.4.29 (Git n/a), Compiled with libfreerdp 2.10.0 (2.10.0), Running with libfreerdp 2.9.0 (rev 2.9.0), H.264 No
SPICE Protocol SPICE - Simple Protocol for Independent Computing Environments 1.4.29
VNC Protocol Remmina VNC Plugin 1.4.29
VNCI Protocol Remmina VNC listener Plugin 1.4.29
WWW Protocol Remmina web-browser plugin 0.1.0
glibsecret Secret Secured password storage in the GNOME keyring 1.4.29
Build configuration: HAVE_ARPA_INET_H=1 HAVE_ERRNO_H=1 HAVE_FCNTL_H=1 HAVE_NETDB_H=1 HAVE_NETINET_IN_H=1 HAVE_NETINET_TCP_H=1 HAVE_SYS_SOCKET_H=1 HAVE_SYS_UN_H=1 HAVE_TERMIOS_H=1 HAVE_UNISTD_H=1 WITH_APPINDICATOR=false WITH_AVAHI=true WITH_CLEANUP=OFF WITH_CUPS=true WITH_GCRYPT=true WITH_ICON_CACHE=ON WITH_IPP=OFF WITH_KF5WALLET=false WITH_LIBRARY_VERSIONING=ON WITH_LIBSSH=true WITH_LIBVNCSERVER=true WITH_MANPAGES=ON WITH_PYTHONLIBS=false WITH_SPICE=true WITH_SSE2=OFF WITH_TRANSLATIONS=true WITH_UPDATE_DESKTOP_DB=ON WITH_VTE=true WITH_WEBKIT2GTK=true
Build type: Debug
CFLAGS: -pipe -g -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wdeprecated-declarations
Compiler: Clang, 13.0.0
Target architecture:
sudo lshw -C video
uname -a
Contributions
In return, or to fix this issue, I'd be willing to:
-
Fix this myself. -
Donate ___ and/or have donated ___ towards fixing it. -
Take a donation of ___ to fix it. -
Update the documentation. -
Update the wiki. -
Translate Remmina in my native language(s) (___) on Hosted Weblate.