Public bug reported:
--
# gdb
[New LWP 3882]
Core was generated by `/bin/ksh <KSH_SCRIPT>.ksh'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 job_chksave (pid=pid@entry=19385) at
/build/ksh-6IEHIC/ksh-93u+20120801/src/cmd/ksh93/sh/jobs.c:1948
1948 if(jp->pid==pid)
(gdb) p *jp
Cannot access memory at address 0xb
(gdb) p *jp->pid
Cannot access memory at address 0x13
(gdb) p pid
$2 = 19385
(gdb) p *jpold
$1 = {next = 0xb, pid = -604008960, exitval = 11124}
The struct is corrupted at some point looking at the next,pid and
exitval struct members values which isn't valid data.
# assembly code
=> 0x0000000000427159 <+41>: cmp %edi,0x8(%rdx)
(gdb) p $edi ## pid variable
$1 = 19385
(gdb) p *($rdx + 8) ## jp->pid struct
Cannot access memory at address 0x13
--
ksh is segfaulting because it can't access struct "jp" ($rdx) thus
cannot de-reference the struct member "jp>pid" ($rdx + 8) at line :
src/cmd/ksh93/sh/jobs.c:1948 when looking if jp->pid is equal to pid
($edi) variable.
I have looked at the github project "att/ast" upstream repo and some
patches here and there, and nothing seems to apply.
Note that the project seems unmaintained anymore.
** Affects: ksh (Ubuntu)
Importance: Low
Status: New
** Changed in: ksh (Ubuntu)
Importance: Undecided => Low
** Description changed:
- ksh is segfaulting because it can't access struct "jp" ($rdx) thus
- cannot de-reference the struct member "jp>pid" ($rdx + 8) at line :
- src/cmd/ksh93/sh/jobs.c:1948 when looking if jp->pid is equal to pid
- ($edi) variable.
-
- --
+ --
# gdb
[New LWP 3882]
Core was generated by `/bin/ksh <KSH_SCRIPT>.ksh'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 job_chksave (pid=pid@entry=19385) at
/build/ksh-6IEHIC/ksh-93u+20120801/src/cmd/ksh93/sh/jobs.c:1948
1948 if(jp->pid==pid)
(gdb) p *jp
Cannot access memory at address 0xb
(gdb) p *jp->pid
Cannot access memory at address 0x13
(gdb) p pid
$2 = 19385
(gdb) p *jpold
$1 = {next = 0xb, pid = -604008960, exitval = 11124}
The struct is corrupted at some point looking at the next,pid and
exitval struct members values which isn't valid data.
# assembly code
=> 0x0000000000427159 <+41>: cmp %edi,0x8(%rdx)
(gdb) p $edi ## pid variable
$1 = 19385
(gdb) p *($rdx + 8) ## jp->pid struct
Cannot access memory at address 0x13
- --
+ --
- I have looked the "att/ast" upstream repo and some patches here and
- there, and nothing seems to apply.
+ ksh is segfaulting because it can't access struct "jp" ($rdx) thus
+ cannot de-reference the struct member "jp>pid" ($rdx + 8) at line :
+ src/cmd/ksh93/sh/jobs.c:1948 when looking if jp->pid is equal to pid
+ ($edi) variable.
+
+ I have looked at the github project "att/ast" upstream repo and some
+ patches here and there, and nothing seems to apply.
Note that the project seems unmaintained anymore.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1697501
Title:
ksh segfault on job_chksave ()
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ksh/+bug/1697501/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs