ksh93 problems (ksh 2020)

Bug #1918017 reported by C. Jeffery Small
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ksh (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Running Xubuntu 20.04.02

I've been running ksh93 for 40 years now. Somewhere in the recent past, ksh started performing in strange ways. In particular, it stopped adding commands with faulty syntax to the command history list, rendering them unavailable for recall and editing. Upon further investigation, I discovered that ksh93 had been silently replaced by ksh2020, which is apparently (according to other reports)a buggy and unsupported version of ksh that AT&T recently washed their hands of. If you look at synaptic, the ksh93 version is not even listed -- only ksh2020.

See this image: http://smallthoughts.com/photos/misc/ksh_01.jpg

ksh93 is still available in the focal repository and I was able to reinstall it with:

apt install ksh93

but it remains unlisted in synaptic.

First, ksh2020 is buggy and should not be used -- and certainly not as the primary ksh installation.

Second, the distro repository needs to be updated to list the ksh93 package available and made the default.

This silent replacement of ksh has caused me many hours of problems!

Tags: bot-comment

CVE References

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1918017/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → ksh (Ubuntu)
Revision history for this message
Brian Murray (brian-murray) wrote :

Shortly after the release of Ubuntu 20.04 LTS ksh was reverted back to version 93u+.

ksh (2020.0.0+really93u+20120801-6) unstable; urgency=high

  * v2020 of ksh is no longer being maintained and upstream repository has
    been reverted back to the last stable version of 93u+. This update
    reverts back the ksh2020 changes back to the original ksh93 from AT&T.
  * Patch for CVE-2019-14868 - certain environment variables were
    interpreted as arithmetic expressions on startup, leading to code
    injection

 -- Anuradha Weeraman <email address hidden> Sat, 27 Jun 2020 21:17:32 -0400

It might be possible to create an SRU of ksh to Ubuntu 20.04 LTS that also reverts it to revision 93u. The SRU process is documented at https://wiki.ubuntu.com/StableReleaseUpdates.

Revision history for this message
C. Jeffery Small (loyhz2ay-jeff-h670zbts) wrote :

I did manually install ksh93u and all is back to normal on my machine. However, the 2020 package still gets reported in synaptic, hiding all mention of ksh93. Even under the "Installed (manual)" section, ksh is listed, but still reported as version 2020. There is no recognition of 93u being in the local package DB, even though it is there! So I agree that what Brian is suggesting would be a good thing to get these repositories to 1) distinguish between 93u and 2020, and 2) get 93u listed as the default package, to avoid a lot of confusion. Since it was already replaced shortly after the 20.04 release, this seems like a well tested option that can be adopted without causing regression problems.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ksh (Ubuntu):
status: New → Confirmed
Revision history for this message
Minx Ab (minxab) wrote (last edit ):

Highly recommend that the action proposed in #2 is taken. (If I understand it correctly).

In my opinion: The 2020 version has nothing to do as main package for ksh, and absolutely not in an LTS release.

As for the bug experienced by OP it is ugly. The history loading is botched and have several bugs. When history reaches a limit of N bytes it does no longer write to history file. It then opens a new file descriptor to the history file for each command. On for example Linux this can give something like:

 $ find /proc/PID-of-ksh/fd -lname '*/.sh_history' | wc -l
 746

(Opinion on the 2020 project) Sure there was honest intentions to make it better, but from the looks of things there was very little understanding and respect in the mix. It seemed more important to paint Korn as a crazy spaghetti coder who obfuscate with intent – then understanding the code. Think that is sad.

summary: - ksh93 problems
+ ksh93 problems (ksh 2020)
Revision history for this message
Anuradha Weeraman (aweeraman) wrote :

We recommend upgrading to the latest ksh93u+m (https://launchpad.net/ubuntu/+source/ksh93u+m) which reverts ksh2020, and builds upon 93u+. Please file a report if you do see any issues.

Changed in ksh (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.