This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug glob/24607] Segmentation Fault in Glob with invalid path
- From: "sourceware at jonathancottrill dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 23 May 2019 11:59:06 +0000
- Subject: [Bug glob/24607] Segmentation Fault in Glob with invalid path
- Auto-submitted: auto-generated
- References: <bug-24607-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=24607
--- Comment #2 from Jonathan Cottrill <sourceware at jonathancottrill dot net> ---
I'm able to reproduce this in Ubuntu 19.04, glibc 2.29, inside a Docker
container, using these steps:
docker run --rm -it --privileged ubuntu:19.04
Inside the container:
apt update && apt install -y gcc gdb
cat >glob.c <<<'
#include <glob.h>
#include <stddef.h>
int main() {
glob_t g;
glob("//*/.*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////./.**",
8198, NULL, &g);
return 0;
}
'
gcc -o glob glob.c
gdb -ex run glob
Output is similar to screenshot Nicholas Starke posted:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7ec0984 in __glob (pattern=pattern@entry=0x7fffff7ff300 "//*/.*",
'/' <repeats 194 times>..., flags=flags@entry=8198, errfunc=errfunc@entry=0x0,
pglob=pglob@entry=0x7fffffffcfd0) at ../posix/glob.c:289
--
You are receiving this mail because:
You are on the CC list for the bug.