| Summary: | sftp crash with 'invalid multibyte character' when pressing Tab to complete specific Chinese filenames | ||
|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | nebclllo0444 |
| Component: | sftp | Assignee: | Assigned to nobody <unassigned-bugs> |
| Status: | NEW --- | ||
| Severity: | trivial | CC: | dtucker |
| Priority: | P5 | ||
| Version: | 8.4p1 | ||
| Hardware: | amd64 | ||
| OS: | Linux | ||
|
Description
nebclllo0444
2023-03-08 19:59:32 AEDT
Can you reproduce the problem with a a stock openssh built from the source from openssh.com? We cannot help you with vendor-supplied (usually modified) binaries, you will need to seek help from the vendor that supplied them.
A couple of suggestions:
- run sftp under gdb and see where it crashes ("gdb --args /usr/bin/sftp localhost", "run", then when it crashes use "bt" to get a backtrace).
- I vaguely recall utf8 crashing bugs with some versions of libedit, maybe check if there's an update for that.
I made a quick attempt to reproduce here on Fedora (libedit-3.1-41.20210910cvs.fc36.x86_64) with both -current and 8.4p1 but it worked as expected (although it's possible I'm doing something wrong, I don't normally used non-ascii).
I did manage to reproduce this on an ARM SBC running a Debian 10.13 derivative. $ gdb -q --args /usr/bin/sftp localhost Reading symbols from /usr/bin/sftp...(no debugging symbols found)...done. (gdb) run [...] Connected to localhost. sftp> cd /tmp/t sftp> ls 啊 啊一啊 啊二啊 invalid multibyte character [Inferior 1 (process 26809) exited with code 0377] So it's not a crash as in segfault, it prints an error then exits. The system has libedit 3.1-20181209-1. If I build OpenSSH against a locally-built libedit-20221030-3.1 it doesn't do this (it doesn't autocomplete either, but that seems reasonable). I think you're looking at a libedit bug. (In reply to Darren Tucker from comment #2) > The system has libedit 3.1-20181209-1. ... and if I build OpenSSH 8.4p1 against the system libedit, it also fails, but if I build 8.4p1 against the newest libedit it doesn't. libedit on linux is ported from NetBSD, so I installed NetBSD 9.3 but found that there are few documentations about localization, and CJK characters in terminal(both in ssh and Xfce4 Terminal) will be displayed in '?' but Xfce4 it self seems normal. Should I keep on trying to reproduce the problem on NetBSD? (In reply to nebclllo0444 from comment #4) > Should I keep on trying to reproduce the problem on NetBSD? Based on the libedit version numbers, my guess is that the problem was fixed in NetBSD sometime between 2018 and 2020. If that's correct, you won't be able to reproduce it on any modern NetBSD version, so not being able to reproduce on 9.3 is not surprising. |