bash: non existent locale crashes bash
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bash (Debian) |
Fix Released
|
Unknown
|
|||
bash (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
systemd (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Imported from Debian bug http://
Package: libc6
Version: 2.35-1
Severity: grave
Justification: renders package unusable
X-Debbugs-Cc: <email address hidden>
Dear maintainer,
After upgrading to libc6 2.35-1 (or 2.36-1 in experimental), nonexistent locale setting
starts to crash the system.
This is dangerous because a remote system might not always have the same locale installed.
An auto update will soft-brick the system unless the sysadmin knows to set their LC_ALL=POSIX
before attempting to ssh.
Steps to reproduce:
From a clean installed Debian sid, upgrade to libc6 2.35-1.
Only install C locale and en_US.UTF-8.
$ LC_ALL=ja_JP.UTF-8 bash
bash: warning: setlocale: LC_ALL: cannot change locale (ja_JP.UTF-8)
Segmentation fault (core dumped)
$ LC_ALL=ja_JP.UTF-8 gdb bash
Fatal signal: Segmentation fault
----- Backtrace -----
0x55ed3e1e8dcf ???
0x55ed3e2df312 ???
0x55ed3e2df488 ???
0x7f0b4a39ba9f ???
0x7f0b4b412204 _rl_init_locale
0x7f0b4b4122f1 _rl_init_eightbit
0x7f0b4b3f10f2 rl_initialize
... snip ...
Downgrade to 2.34-8 seems also don't fix the issue, probably some locale
state was invalidated when upgrading.
Thanks,
Kan-Ru
-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 5.19.0-2-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/
LSM: AppArmor: enabled
Versions of packages libc6 depends on:
ii libgcc-s1 12.2.0-3
Versions of packages libc6 recommends:
ii libidn2-0 2.3.3-1+b1
Versions of packages libc6 suggests:
ii debconf [debconf-2.0] 1.5.79
pn glibc-doc <none>
ii libc-l10n 2.35-1
pn libnss-nis <none>
pn libnss-nisplus <none>
ii locales 2.35-1
-- debconf information:
glibc/
glibc/
glibc/
glibc/upgrade: true
* libraries/
* glibc/restart-
glibc/
Changed in bash (Debian): | |
importance: | Undecided → Unknown |
Changed in bash (Debian): | |
status: | New → Confirmed |
Changed in bash (Debian): | |
status: | Confirmed → Fix Released |
I came across this today debugging the recent TEST-69-SHUTDOWN failures in systemd autopkgtest[1]. That test automates a login, which due to the test environment triggers this segfault and causes the test to fail.
[1] https:/ /autopkgtest. ubuntu. com/results/ autopkgtest- kinetic/ kinetic/ amd64/s/ systemd/ 20221003_ 103148_ cc8ac@/ log.gz