Debian Bug report logs -
#972286
coreutils: Crash when using globs on a path with non-latin characters
Reported by: ಚಿರಾಗ್ ನಟರಾಜ್ <debbugs@chiraag.me>
Date: Thu, 15 Oct 2020 20:33:02 UTC
Severity: important
Tags: fixed-upstream, l10n
Merged with 972672
Found in versions bash/5.1~rc1-2, bash/5.1~alpha1-1
Fixed in version bash/5.1~rc2-1
Done: Matthias Klose <doko@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, debbugs@chiraag.me, Michael Stone <mstone@debian.org>:
Bug#972286; Package coreutils.
(Thu, 15 Oct 2020 20:33:04 GMT) (full text, mbox, link).
Acknowledgement sent
to ಚಿರಾಗ್ ನಟರಾಜ್ <debbugs@chiraag.me>:
New Bug report received and forwarded. Copy sent to debbugs@chiraag.me, Michael Stone <mstone@debian.org>.
(Thu, 15 Oct 2020 20:33:04 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: coreutils
Version: 8.32-4+b1
Severity: important
Tags: l10n
X-Debbugs-Cc: debbugs@chiraag.me
Dear Maintainer,
Steps to reproduce:
1. mkdir ~/ಇಳಿಕೆಗಳು
2. touch ~/ಇಳಿಕೆಗಳು/{a,b}.txt
3. ls ~/ಇಳಿಕೆಗಳು/*.txt crashes immediately
By contrast:
1. cd ~/ಇಳಿಕೆಗಳು/ && ls *.txt succeeds
2. ls ಇಳಿಕೆಗಳು/*.txt succeeds
Similarly, `cp ~/ಇಳಿಕೆಗಳು/*.txt .` crashes, but `cp ಇಳಿಕೆಗಳು/*.txt .` works, as does `cd ಇಳಿಕೆಗಳು && cp *.txt ~`.
Please let me know if you need more information.
- Chiraag
-- System Information:
Debian Release: bullseye/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 5.8.0-1-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=kn_IN.UTF-8, LC_CTYPE=kn_IN.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages coreutils depends on:
ii libacl1 2.2.53-8
ii libattr1 1:2.4.48-5
ii libc6 2.31-4
ii libgmp10 2:6.2.0+dfsg-6
ii libselinux1 3.1-2+b1
coreutils recommends no packages.
coreutils suggests no packages.
-- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, Michael Stone <mstone@debian.org>:
Bug#972286; Package coreutils.
(Thu, 15 Oct 2020 21:39:02 GMT) (full text, mbox, link).
Acknowledgement sent
to ಚಿರಾಗ್ ನಟರಾಜ್ <debbugs@chiraag.me>:
Extra info received and forwarded to list. Copy sent to Michael Stone <mstone@debian.org>.
(Thu, 15 Oct 2020 21:39:02 GMT) (full text, mbox, link).
Message #10 received at 972286@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
It seems that the key part is including the ~ character along with non-latin elements of the path.
The following work:
1. ls ${HOME}/ಇಳಿಕೆಗಳು/*.txt
2. ls /home/$(whoami)/ಇಳಿಕೆಗಳು/*.txt
3. ls ~/.config/*rc
While `ls ~/ಇಳಿಕೆಗಳು/*.txt` does not.
- Chiraag
--
ಚಿರಾಗ್ ನಟರಾಜ್
Pronouns: he/him/his
[publickey - debbugs@chiraag.me.asc.pgp (application/pgp-key, attachment)]
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to debian-bugs-dist@lists.debian.org:
Bug#972286; Package coreutils.
(Thu, 15 Oct 2020 21:39:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Michael Stone <mstone@debian.org>:
Extra info received and forwarded to list.
(Thu, 15 Oct 2020 21:39:03 GMT) (full text, mbox, link).
Message #15 received at 972286@bugs.debian.org (full text, mbox, reply):
On Thu, Oct 15, 2020 at 04:28:35PM -0400, you wrote:
>Steps to reproduce:
>
>1. mkdir ~/ಇಳಿಕೆಗಳು
>2. touch ~/ಇಳಿಕೆಗಳು/{a,b}.txt
>3. ls ~/ಇಳಿಕೆಗಳು/*.txt crashes immediately
>
>By contrast:
>
>1. cd ~/ಇಳಿಕೆಗಳು/ && ls *.txt succeeds
>2. ls ಇಳಿಕೆಗಳು/*.txt succeeds
>
>Similarly, `cp ~/ಇಳಿಕೆಗಳು/*.txt .` crashes, but `cp ಇಳಿಕೆಗಳು/*.txt .` works, as does `cd ಇಳಿಕೆಗಳು && cp *.txt ~`.
>
>Please let me know if you need more information.
coreutils doesn't have anything to do with expanding a shell wildcard,
the bug needs to be assigned to whatever shell you're using.
Information forwarded
to debian-bugs-dist@lists.debian.org, Michael Stone <mstone@debian.org>:
Bug#972286; Package coreutils.
(Thu, 15 Oct 2020 21:45:03 GMT) (full text, mbox, link).
Acknowledgement sent
to ಚಿರಾಗ್ ನಟರಾಜ್ <debbugs@chiraag.me>:
Extra info received and forwarded to list. Copy sent to Michael Stone <mstone@debian.org>.
(Thu, 15 Oct 2020 21:45:03 GMT) (full text, mbox, link).
Message #20 received at 972286@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
15/10/20 17:29 ನಲ್ಲಿ, Michael Stone <mstone@debian.org> ಬರೆದರು:
>
> On Thu, Oct 15, 2020 at 04:28:35PM -0400, you wrote:
> >Steps to reproduce:
> >
> >1. mkdir ~/ಇಳಿಕೆಗಳು
> >2. touch ~/ಇಳಿಕೆಗಳು/{a,b}.txt
> >3. ls ~/ಇಳಿಕೆಗಳು/*.txt crashes immediately
> >
> >By contrast:
> >
> >1. cd ~/ಇಳಿಕೆಗಳು/ && ls *.txt succeeds
> >2. ls ಇಳಿಕೆಗಳು/*.txt succeeds
> >
> >Similarly, `cp ~/ಇಳಿಕೆಗಳು/*.txt .` crashes, but `cp ಇಳಿಕೆಗಳು/*.txt .` works, as does `cd ಇಳಿಕೆಗಳು && cp *.txt ~`.
> >
> >Please let me know if you need more information.
>
> coreutils doesn't have anything to do with expanding a shell wildcard,
> the bug needs to be assigned to whatever shell you're using.
Got it, I'll submit this to bash (verified that it's a shell problem by testing with a different shell).
[publickey - debbugs@chiraag.me.asc.pgp (application/pgp-key, attachment)]
[signature.asc (application/pgp-signature, attachment)]
Bug reassigned from package 'coreutils' to 'bash'.
Request was from Bernhard Übelacker <bernhardu@mailbox.org>
to control@bugs.debian.org.
(Fri, 30 Oct 2020 17:27:02 GMT) (full text, mbox, link).
No longer marked as found in versions coreutils/8.32-4.
Request was from Bernhard Übelacker <bernhardu@mailbox.org>
to control@bugs.debian.org.
(Fri, 30 Oct 2020 17:27:02 GMT) (full text, mbox, link).
Marked as found in versions bash/5.1~rc1-2.
Request was from Bernhard Übelacker <bernhardu@mailbox.org>
to control@bugs.debian.org.
(Fri, 30 Oct 2020 17:27:03 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#972286; Package bash.
(Fri, 30 Oct 2020 17:45:05 GMT) (full text, mbox, link).
Acknowledgement sent
to Bernhard Übelacker <bernhardu@mailbox.org>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>.
(Fri, 30 Oct 2020 17:45:05 GMT) (full text, mbox, link).
Message #31 received at 972286@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
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 0x00005575f65a24fb in wdequote_pathname (pathname=pathname@entry=0x5575f798b870 "/home/benutzer/ಇಳಿಕೆಗಳು/") at ../../.././lib/glob/glob.c:487
#1 0x00005575f65a30eb 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 0x00005575f656dc2d in shell_glob_filename (pathname=<optimized out>, qflags=qflags@entry=8) at .././pathexp.c:470
#4 0x00005575f655b3e6 in glob_expand_word_list (tlist=0x5575f7a62c20, eflags=31) at .././subst.c:11383
#5 0x00005575f6568685 in expand_word_list_internal (eflags=31, list=<optimized out>) at .././subst.c:11983
#6 expand_words (list=<optimized out>) at .././subst.c:11331
#7 0x00005575f653a5f3 in execute_simple_command (fds_to_close=0x5575f7a73280, async=0, pipe_out=-1, pipe_in=-1, simple_command=<optimized out>) at .././execute_cmd.c:4377
#8 execute_command_internal (command=0x5575f79af5c0, asynchronous=<optimized out>, pipe_in=-1, pipe_out=<optimized out>, fds_to_close=0x5575f7a73280) at .././execute_cmd.c:846
#9 0x00005575f653b865 in execute_command (command=0x5575f79af5c0) at .././execute_cmd.c:395
#10 0x00005575f65219db in reader_loop () at .././eval.c:170
#11 0x00005575f6520668 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
[debugging.txt (text/plain, attachment)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#972286; Package bash.
(Fri, 30 Oct 2020 19:33:02 GMT) (full text, mbox, link).
Acknowledgement sent
to chet.ramey@case.edu:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>.
(Fri, 30 Oct 2020 19:33:03 GMT) (full text, mbox, link).
Message #36 received at 972286@bugs.debian.org (full text, mbox, reply):
On 10/30/20 1:41 PM, Bernhard Übelacker wrote:
> 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.
Thanks for the report and the pointer to a fix.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
Marked as found in versions bash/5.1~alpha1-1.
Request was from Frédéric Brière <fbriere@fbriere.net>
to control@bugs.debian.org.
(Wed, 04 Nov 2020 04:48:03 GMT) (full text, mbox, link).
Added tag(s) fixed-upstream.
Request was from Frédéric Brière <fbriere@fbriere.net>
to control@bugs.debian.org.
(Wed, 04 Nov 2020 04:48:04 GMT) (full text, mbox, link).
Merged 972286 972672
Request was from Thomas Schwinge <thomas@schwinge.name>
to 972672-submit@bugs.debian.org.
(Wed, 04 Nov 2020 08:48:04 GMT) (full text, mbox, link).
Message #43 received at 972672-close@bugs.debian.org (full text, mbox, reply):
Source: bash
Source-Version: 5.1~rc2-1
Done: Matthias Klose <doko@debian.org>
We believe that the bug you reported is fixed in the latest version of
bash, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 972672@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Matthias Klose <doko@debian.org> (supplier of updated bash package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Wed, 04 Nov 2020 18:01:32 +0100
Source: bash
Architecture: source
Version: 5.1~rc2-1
Distribution: unstable
Urgency: medium
Maintainer: Matthias Klose <doko@debian.org>
Changed-By: Matthias Klose <doko@debian.org>
Closes: 972672
Changes:
bash (5.1~rc2-1) unstable; urgency=medium
.
* New upstream release candidate 2.
- Fix locale related crash. Closes: #972672.
Checksums-Sha1:
7df80c8f92c7257cabb1ebbe39c9e69134286fd8 2324 bash_5.1~rc2-1.dsc
2f1d0134aee47d1b3fa9a8c7385baed05f175a56 5768912 bash_5.1~rc2.orig.tar.xz
00305367a84458b2f0fb4568eaf8b066410b4d9d 88176 bash_5.1~rc2-1.debian.tar.xz
d17d4842c7b9acd5f2b1617556afe28944a3e0ab 6816 bash_5.1~rc2-1_source.buildinfo
Checksums-Sha256:
2e500effc33722fcaec52a989b53df8e0b4eae1171c97dccc87f4061768263b7 2324 bash_5.1~rc2-1.dsc
c191335496bd91ab85a6eed85e9ffcdaaf23edb77d23d69fdfd7bf65e29b7f80 5768912 bash_5.1~rc2.orig.tar.xz
51242ef94a38881008ef7b7571f17c07e15ddb1af0c02f3f9ab43bf0a98bab7a 88176 bash_5.1~rc2-1.debian.tar.xz
a81041bbd18986fd675b5600f2d3484e0b7ae76b97d6c73f0c959027114b5daf 6816 bash_5.1~rc2-1_source.buildinfo
Files:
4718f1bbc0362b8ee0ceb07cf5f3bbb3 2324 base required bash_5.1~rc2-1.dsc
1e3bdd2b4568189ca4037b90eb4d122e 5768912 base required bash_5.1~rc2.orig.tar.xz
d694fdb057e500accda0b860efa2aba2 88176 base required bash_5.1~rc2-1.debian.tar.xz
9087fca12e8e16d2766a208dc8b9aa93 6816 base required bash_5.1~rc2-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJEBAEBCAAuFiEE1WVxuIqLuvFAv2PWvX6qYHePpvUFAl+i4fAQHGRva29AZGVi
aWFuLm9yZwAKCRC9fqpgd4+m9aRCEACgSuIK+LVNFQDfenDzYvgttkf+d/agcgqk
AVUh/qbaHMk5f+pxoWIchfmQxi+b9An/TLdwhtgbg4Og4vn7lMItHDMaFbQ4qrMh
wT8RCt+ojhyOW9VBf2fV6KcGQJnjEjt42ijF23D3CojQKoXRlLOOEx0WlnXDJi30
gPDQI0yzHV3gNa2OXGYEHX+9uzAvVJ8Q2w8tO0+fSvu0GyExUO4VNmo1w07AbSDH
UtINM72sq+MEh6ILIL9kI5+lQhKTUiiauUkltumG/aEl6JocpGQuMK5htoxSgUTJ
yX3Uhq3J6iAt83+dl1Lyptx39PU7XuUUi6B2/gzG8Nib1WglSpsfIWJzlUKky2W2
jYnGA3peSHzW3E3+l8VG7NYPPZUwCjWJNM4cm1SK6cnmZkUWVSs4PDvA1FzmZkLp
iaIp88UBN9q7KEtLTre1eC5PNzEuIgftXZEN/ppjZeRbwoNU/hJXvvRkpy4TC8w1
uqmeal1N1UZf6Ue1zMT06b1WEJ7xTUwlzkCfl1AhegDf9/GLHZkbp6SPn9UwLX72
Pco9F+4b5gyEeuahgy5gOobH6DNCKOH/UZIHRpEnC+yvMo0lfM+e/VRASRwrfgRq
IaNAH7xaOiFATPM1gz0+VrtmaoSX8Wej+ULO/zF5PRolifrwbIqpQUPGh7b0VQZs
UmK/D3cMYA==
=8PKl
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Tue, 08 Dec 2020 07:27:32 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Wed Dec 6 07:12:27 2023;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.