Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-12011

ksh scripts result in segmentation faults when PATH contains "." and a sub-process runs in a directory containing .paths sub-directory

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Normal Normal
    • rhel-8.10
    • rhel-7.0, rhel-8.9.0
    • ksh
    • ksh-20120801-263.el8
    • None
    • Low
    • sst_cs_plumbers
    • ssg_core_services
    • 11
    • 26
    • 1
    • QE ack
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • If docs needed, set a value
    • None

      1. Description of problem:

      Using ksh across multiple versions of RHEL, customer reports that ksh scripts result in a segmentation fault when "." is in the PATH variable and a sub-process (pwd, ls, etc.) runs in a directory with a .paths sub-directory.

      2. Version-Release number of selected component (if applicable):

      Multiple versions of ksh (I used 20120801-143.el7_9)

      3. How reproducible:

      Always

      4. Steps to Reproduce:

      4.1. $ export PATH=${PATH}:.

      4.2. $ vi crash.ksh

      #!/bin/ksh

      mkdir -p OK CRASH/.paths

      echo "OK case: " 1>&2
      ok=$(cd OK; pwd)
      echo "OK case: pwd=${ok}" 1>&2

      echo "crash case: " 1>&2
      crash=$(cd CRASH; pwd)
      echo "crash case: pwd=${crash}" 1>&2

      4.3. $ chmod u+x crash.ksh

      4.4. $ ./crash.ksh

      5. Actual results:

      OK case:
      OK case: pwd=/../OK
      crash case:
      Segmentation fault

      6. Expected results:

      OK case:
      OK case: pwd=/../OK
      crash case:
      crash case: pwd=/../CRASH

      7. Additional info:

      Customer reports that this occurs in multiple versions of RHEL, and therefore multiple versions of ksh. I performed a similar test in Fedora but did not encounter the reported problem.

              kvolny Karel Volný
              rhn-support-sbrockme Shawn Brockmeier
              Vincent Mihalkovic Vincent Mihalkovic
              Karel Volný Karel Volný
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: