|
![]() |
|
|
|
Vulnerability Note VU#10277Various shells create temporary files insecurely when using << operatorOverviewsh uses /tmp files of a predictable name in creating files for input redirection using the << operator.I. DescriptionWhen performing the "<<" redirection, /bin/sh creates a temporary file in /tmp with a name based on the process id, writes subsequent input out to that file, and then closes the file before re-opening it as the standard input of the command to be executed. At no stage are the results of the creat(), write(), or open() calls checked for an error status.II. ImpactIt is possible for another user to alter what is read from this file.
It may also be possible to create a symbolic link named as the temporary file and pointed to any other file on the system writable by the user of the shell, which may lead to corruption of the file to which the link is pointed. III. SolutionApply vendor patches; see the Systems Affected section below.Avoid the use of << operator in cron jobs and similar administration scripts.
References
The original discoverer of this vul was Gordon Irlam of the Univeristy of Adelaide, Australia. This document was written by James T. Ellis, modified by Tim Shimeall to reflect 2001 reporting
If you have feedback, comments, or additional information about this vulnerability, please send us
email. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||