+++ This bug was initially created as a clone of Bug #223072 +++ Description of problem: Version 0.3 of GNU ed replaced use of unsecure mktemp() followed by fopen() in buf.c:open_sbuf() with tmpnam(). The former construction is vulnerable to race condition, where a malicous user can create the temporary file between two function calls, as they are non-atomic, and then either read or write the contents of the file, or make it a symbolic link to a file owned by the victim resulting in its overite. Version-Release number of selected component (if applicable): GNU ed 0.2, in RHEL{2.1,3,4,5} and FC{5,6} How reproducible: Time-dependent race condition, very unlikely. Steps to Reproduce: 1. Attempt to guess the filename returned by mktemp() and attempt create it while being schelduled between mktemp() and fopen() calls. -- Additional comment from lkundrak on 2007-01-17 14:34 EST -- Created an attachment (id=145853) Backported patch that corrects CVE-2006-6939 GNU ed insecure tmp file handling.