Bug 2002734 - Disable locale forwarding in OpenSSH
Summary: Disable locale forwarding in OpenSSH
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: openssh
Version: 9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Dmitry Belyavskiy
QA Contact: Marek Havrila
Jan Fiala
URL:
Whiteboard:
Depends On:
Blocks: 2002739
TreeView+ depends on / blocked
 
Reported: 2021-09-09 15:08 UTC by Dmitry Belyavskiy
Modified: 2022-01-24 15:33 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
.Locale forwarding disabled by default in OpenSSH Using the `C.UTF-8` locale in small images, such as containers and virtual machines, reduces size and improves performance over using the traditional `en_US.UTF-8` locale. Most distributions send locale environment variables by default and accept them on the server side. However, this meant that logging in through SSH from clients that used locales other than `C` or `C.UTF-8` to servers that did not have the `glibc-langpack-en` or `glibc-all-langpacks` package installed resulted in degraded user experience. Specifically, output in the UTF-8 format was broken and some tools did not work or sent frequent warning messages. With this update, locale forwarding is switched off by default in OpenSSH. This keeps the locale viable even if clients connect to servers with minimal installations that support only a small set of locales.
Clone Of:
: 2002739 (view as bug list)
Environment:
Last Closed:
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CRYPTO-4842 0 None None None 2021-09-15 13:03:04 UTC
Red Hat Issue Tracker CRYPTO-5035 0 None None None 2021-10-12 15:19:13 UTC
Red Hat Issue Tracker RHELPLAN-96670 0 None None None 2021-09-09 15:11:18 UTC

Description Dmitry Belyavskiy 2021-09-09 15:08:01 UTC
There is a movement towards C.UTF-8 for small images (containers and
VMs).  C.UTF-8 has both size and performance improvements over the more
traditional en_US.UTF-8 locale.  (The performance improvement is
currently in upstream glibc only, but we plan to bring it to rawhide and
Fedora 35 shortly.)

However, in a world where glibc-langpack-en (or glibc-all-langpacks) is
not installed on target systems, logging in over SSH does not result in
a viable locale if the client use en_US.UTF-8 (or any other locale
except C or C.UTF-8).  This causes a severe degradation in user
experience.  It's not only that UTF-8 output does not work, there are
also frequent warning messages from various tools.  Some may even refuse
to run completely.

Most distributions send locale environment variables by default:

SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
SendEnv LC_IDENTIFICATION LC_ALL LANGUAGE
SendEnv XMODIFIERS

And accept them on the server side:

AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS

(Some distributions also use LC_* wildcards.)

Now that servers often use minimal installations which only support a
small set of locales (C, C.UTF-8), it makes sense to discontinue
this practice.

Comment 1 Dmitry Belyavskiy 2021-09-09 16:15:25 UTC
https://lists.mindrot.org/pipermail/openssh-unix-dev/2021-September/039582.html OpenSSH ipstream thread

Comment 2 Carlos O'Donell 2021-09-10 13:30:08 UTC
*** Bug 2000878 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.