Skip to content
This repository was archived by the owner on Jun 16, 2025. It is now read-only.

Crash when attempting to open a TCP socket.Β #1438

Open
@0branch

Description

@0branch

Description of problem:
ksh crashes when attempting to establish a TCP connection with exec under certain situations.

Ksh version:
Version A 2020.0.0-beta1-166-g1025e369.

How reproducible:
Consistently, for certain inputs.

Steps to reproduce:

  1. Start an interactive ksh session
  2. exec 3<>/dev/tcp/ntp-b.nist.gov/13
  3. Observe crash

Actual results:

$ : print $KSH_VERSION; exec 3<>/dev/tcp/ntp-b.nist.gov/13
Version A 2020.0.0-beta1-166-g1025e369
Killed: 9

Expected results:

$ print $KSH_VERSION; exec 3<>/dev/tcp/ntp-b.nist.gov/13
Version AJM 93u+ 2012-08-01
$

Additional info:
Compare the above with the following, which seems to work as intended (at least, there's no immediate crash):

$ exec 3<>/dev/tcp/irc.freenode.net/6667

So, not all host/port pairs are triggering the problem. UDP not tested.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions