Midnight Commander cons.saver Arbitrary File Write Vulnerability

BID:1945

Info

Midnight Commander cons.saver Arbitrary File Write Vulnerability

Bugtraq ID: 1945
Class: Unknown
CVE:
Remote: No
Local: Yes
Published: Nov 13 2000 12:00AM
Updated: Nov 13 2000 12:00AM
Credit: First posted to Bugtraq by Maurycy Prodeus <[email protected]> on Nov 13, 2000.
Vulnerable: Midnight Commander Midnight Commander 4.5.42
Not Vulnerable:

Discussion

Midnight Commander cons.saver Arbitrary File Write Vulnerability

Midnight Commander is a file management tool for unix systems. Versions 4.5.42 (and likely earlier versions) ship with a tool called cons.saver installed setuid root that is used by Midnight Commander when it is being run from a unix console. The cons.saver program contains a vulnerability that may allow local users to corrupt arbitrary files on the filesystem.

The primary argument to this utility is the path/filename of the terminal device it will use. When cons.saver opens the specified file it tests to determine whether it is a tty or not, but does not close the file descriptor if this test fails. As a result, if a user closes the file descriptor for standard output before cons.saver is executed, cons.saver will open the supplied file and allocate to it file descriptor 1 (standard output) automatically. A null will then be written to what should be standard output but is now the target file before the process exits. If the file specified is a symbolic link, the null will be written to the file pointed to.

Since cons.saver is installed setuid root, any file pointed to by the symbolic link can have a null written to it. This can lead to a local denial of service.

Exploit / POC

Midnight Commander cons.saver Arbitrary File Write Vulnerability

Maurycy Prodeus <[email protected]> submitted an exploit in his post to Bugtraq.

Solution / Fix

Midnight Commander cons.saver Arbitrary File Write Vulnerability

Solution:
Maurycy Prodeus <[email protected]> submitted an unofficial patch in his post to Bugtraq.


Midnight Commander Midnight Commander 4.5.42
© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report