[Bug 3547] New: sftp crash with 'invalid multibyte character' when pressing Tab to complete specific Chinese filenames
bugzilla-daemon at mindrot.org
bugzilla-daemon at mindrot.org
Wed Mar 8 19:59:32 AEDT 2023
https://bugzilla.mindrot.org/show_bug.cgi?id=3547
Bug ID: 3547
Summary: sftp crash with 'invalid multibyte character' when
pressing Tab to complete specific Chinese filenames
Product: Portable OpenSSH
Version: 8.4p1
Hardware: amd64
OS: Linux
Status: NEW
Severity: trivial
Priority: P5
Component: sftp
Assignee: unassigned-bugs at mindrot.org
Reporter: nebclllo0444 at gmail.com
I'm using sftp bundled with OpenSSH 8.4p1-150300.3.15.4 on openSUSE
Leap 15.4. I encountered a problem that when there are some files with
specific Chinese filename. For example:
(using bash with LANG=zh_CN.utf8)
touch (一)
touch (二)
# Create two file that contains character that represents number. They
have the same prefix and suffix. These parentheses are also CJK
characters(Not ASCII).
sftp 127.0.0.1
ls (
# Input the first character(The common prefix of the two filenames)
# And press the Tab to auto-complete
And the client immediately after printing the filenames, leaving the
terminal not usable without a `reset`:
(一) (二)
invalid multibyte character
It seems that only a few combinations will make the client crash. If
these are "(一)" and "(啊)", the client will not crash.
Prefixes and suffixes other than CJK parentheses will make the client
crash, though:
Input 'ls 啊' and press Tab. "啊一啊" "啊二啊" will crash the client. "啊一啊"
"啊哦啊" will not.
Switching sftp subsystem from external sftp server to 'internal-sftp'
in sshd_config will not fix it.
The same problem also exists on Debian Bullseye (with OpenSSH
1:8.4p1-5+deb11u1)
This is my first bug report for OpenSSH, and I'm not good at English.
Sorry for any inconvenience.
--
You are receiving this mail because:
You are watching the assignee of the bug.
More information about the openssh-bugs
mailing list