Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2 -fstack-protector-strong -Wformat
-Werror=format-security -Wall
uname output: Linux debian 5.9.0-1-amd64 #1 SMP Debian 5.9.1-1 (2020-10-17)
x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu
Bash Version: 5.1
Patch Level: 0
Release Status: rc1
Description:
Dear Maintainer,
I tried to collect some more information for the bug described in [1]
and could reproduce the crash just by repeating the given commands
in a minimal debian testing qemu VM. Backtrace in [2].
The last bash version where the crash did not manifest was bash_5.0-7.
In #972672 the last message mentions also wdequote_pathname and
wcsrtombs, therefore I guess this might be related.
As wcsrtombs[3] is specified to set under certain circumstances *src to
NULL,
I assume in this line [4] wpathname should not get dereferenced, or
at least just after being checked for a non-NULL value.
Kind regards,
Bernhard
Repeat-By:
mkdir ~/ಇಳಿಕೆಗಳು
touch ~/ಇಳಿಕೆಗಳು/{a,b}.txt
ls ~/ಇಳಿಕೆಗಳು/*.txt
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=972286
[2]
(rr) bt
#0 0x5575f65a24fb in wdequote_pathname
(pathname=pathname@entry=0x5575f798b870 "/home/benutzer/ಇಳಿಕೆಗಳು/") at
../../.././lib/glob/glob.c:487
#1 0x5575f65a30eb in dequote_pathname (pathname=0x5575f798b870
"/home/benutzer/ಇಳಿಕೆಗಳು/") at ../../.././lib/glob/glob.c:504
#2 glob_filename (pathname=pathname@entry=0x5575f7a733e0
"/\\h\\o\\m\\e/\\b\\e\\n\\u\\t\\z\\e\\r/ಇಳಿಕೆಗಳು/*.txt", flags=0) at
../../.././lib/glob/glob.c:1466
#3 0x5575f656dc2d in shell_glob_filename (pathname=,
qflags=qflags@entry=8) at .././pathexp.c:470
#4 0x5575f655b3e6 in glob_expand_word_list (tlist=0x5575f7a62c20,
eflags=31) at .././subst.c:11383
#5 0x5575f6568685 in expand_word_list_internal (eflags=31,
list=) at .././subst.c:11983
#6 expand_words (list=) at .././subst.c:11331
#7 0x5575f653a5f3 in execute_simple_command
(fds_to_close=0x5575f7a73280, async=0, pipe_out=-1, pipe_in=-1,
simple_command=) at .././execute_cmd.c:4377
#8 execute_command_internal (command=0x5575f79af5c0,
asynchronous=, pipe_in=-1, pipe_out=,
fds_to_close=0x5575f7a73280) at .././execute_cmd.c:846
#9 0x5575f653b865 in execute_command (command=0x5575f79af5c0) at
.././execute_cmd.c:395
#10 0x5575f65219db in reader_loop () at .././eval.c:170
#11 0x5575f6520668 in main (argc=1, argv=0x7ffc8d1bfda8,
env=0x7ffc8d1bfdb8) at .././shell.c:811
[3] https://man7.org/linux/man-pages/man3/wcsrtombs.3.html
[4] https://sources.debian.org/src/bash/5.1%7Erc1-2/lib/glob/glob.c/#L487
# Bullseye/testing amd64 qemu VM 2020-10-30
apt update
apt dist-upgrade
apt install systemd-coredump mc htop psmisc net-tools gdb bash-dbgsym
apt build-dep bash
# for current rr
apt install systemd-coredump mc htop sshfs libcapnp-dev gdb
echo 1 > /proc/sys/kernel/perf_event_paranoid
mkdir -p /home/bernhard/data/entwicklung/2020/rr
sshfs -o allow_other,uid=1000,gid=1000
bernhard@192.168.178.25:/home/bernhard/data/entwicklung/2020/rr
/home/bernhard/data/entwicklung/2020/rr
mkdir /home/benutzer/source/bash/orig -p
cd/home/benutzer/source/bash/orig
apt source bash
cd
mkdir /home/benutzer/source/libc6/orig -p
cd/home/benutzer/source/libc6/orig
apt source libc6
cd
dpkg-reconfigure locales
# add kn_IN.UTF-8
export LANG=kn_IN.UTF-8
mkdir ~/ಇಳಿಕೆಗಳು
touch ~/ಇಳಿಕೆಗಳು/{a,b}.txt
ls ~/ಇಳಿಕೆಗಳು/*.txt
benutzer@debian:~$ mkdir ~/ಇಳಿಕೆಗಳು
benutzer@debian:~$ touch ~/ಇಳಿಕೆಗಳು/{a,b}.txt
benutzer@debian:~$ ls ~/ಇಳಿಕೆಗಳು/*.txt
Connection to 127.0.254.89 closed.
journalctl -e
Okt 30 16:57:24 debian systemd[1]: Started Process Core Dump (PID 3129/UID 0).
Okt 30 16:57:24 debian sshd[2240]: Received disconnect from 10.0.2.2 port
41368:11: disconnected by user
Okt 30 16:57:24 debian sshd[2240]: Disconnected from user benutzer 10.0.2.2
port 41368
Okt 30 16:57:24 debian systemd[1]: session-3.scope: Succeeded.
Okt 30 16:57:24 debian sshd[2234]: pam_unix(sshd:session): session closed for
user benutzer
Okt 30 16:57:24 debian systemd-logind[417]: Session 3 logged out. Waiting for
processes to exit.
Okt 30 16:57:24 debian systemd-logind[417]: Removed session 3.
Okt 30 16:57:24 debian systemd-coredump[3130]: Process 2241 (bash) of user 1000
dumped core.
Stack trace of thread 2241:
#0 0x7fdfef00afe7 kill
(libc.so.6 + 0x3bfe7)
#1 0x560e12312776 n/a (bash
+ 0x7f776)
#2 0x560e12312961
termsig_sighandler (bash + 0x7f961)
#3 0x7fdfef00acc0 n/a
(libc.so.6 + 0x3bcc0)