Bug 1269088
Summary: | ksh crashes under chroot environment with segmentation fault | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Martin Kyral <mkyral> |
Component: | ksh | Assignee: | Siteshwar Vashisht <svashisht> |
Status: | CLOSED ERRATA | QA Contact: | Jan Kepler <jkejda> |
Severity: | medium | Docs Contact: | |
Priority: | urgent | ||
Version: | 7.2 | CC: | isenfeld, jkejda, kdudka, mkyral |
Target Milestone: | rc | Keywords: | Reproducer |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | ksh-20120801-34.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | 1221766 | Environment: | |
Last Closed: | 2017-08-01 16:26:55 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1221766, 1295396 |
Description
Martin Kyral
2015-10-06 09:39:27 UTC
There is no 'test.ksh' file attached with this issue. And I have not been able to reproduce this issue by executing 'chroot /root/NEWROOT /bin/ksh'. Please clarify the reproducer steps. Sorry for the misleading filename. The reproducer is attached as 'reproducer' to the original bug, which is this bug a clone of: BZ#1221766 and it is included in the TCMS test case as test.sh: http://pkgs.devel.redhat.com/cgit/tests/ksh/tree/Regression/ksh-crashes-under-chroot-environment/test.sh I have been able to reproduce this issue. Backtrace shows that strdup() is being called with NULL parameter : 0 __strlen_sse2_pminub () at ../sysdeps/x86_64/multiarch/strlen-sse2-pminub.S:38 #1 0x00000000004a64ae in strdup (s=0x0) at /usr/src/debug/ksh-20120801/src/lib/libast/string/strdup.c:59 #2 0x000000000041c76b in sh_histinit (sh_context=sh_context@entry=0x76e000 <sh>) at /usr/src/debug/ksh-20120801/src/cmd/ksh93/edit/history.c:398 #3 0x000000000040686f in exfile (shp=shp@entry=0x76e000 <sh>, iop=0x76bd20 <_Sfstdin>, fno=fno@entry=0) at /usr/src/debug/ksh-20120801/src/cmd/ksh93/sh/main.c:400 #4 0x000000000040795f in sh_main (ac=<optimized out>, av=0x7fffc4177d28, userinit=<optimized out>) at /usr/src/debug/ksh-20120801/src/cmd/ksh93/sh/main.c:353 #5 0x00007f90d282eb15 in __libc_start_main (main=0x406640 <main>, argc=1, ubp_av=0x7fffc4177d28, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffc4177d18) at libc-start.c:274 #6 0x0000000000406671 in _start () It seems fd=2 is not attached to any terminal. (gdb) frame 2 #2 0x000000000041c76b in sh_histinit (sh_context=sh_context@entry=0x76e000 <sh>) at /usr/src/debug/ksh-20120801/src/cmd/ksh93/edit/history.c:398 398 hp->tty = strdup(ttyname(2)); We already have patch for it https://bugzilla.redhat.com/attachment.cgi?id=1040916 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:1936 |