Bug 67351
| Summary: | Xfig creates temporary files insecurely | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Jarno Huuskonen <jarno.huuskonen> |
| Component: | xfig | Assignee: | Than Ngo <than> |
| Status: | CLOSED RAWHIDE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.2 | Keywords: | Security |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2002-06-23 08:56:18 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
already added your patch file into next release. thanks |
Description of Problem: Xfig (tested both 3.2.3_beta1 and 3.2.3d) creates temporary files with code like this: sprintf(tmpfile, "%s/%s%06d", TMPDIR, "xfig-eps", getpid()); if ((tmpfp = fopen(tmpfile, "wb")) == NULL) { (TMPDIR is either $XFIGTMPDIR or /tmp) So the tempfile name is easy to guess and xfig doesn't use O_EXCL when opening it. Version-Release number of selected component (if applicable): 3.2.3_beta1-2 Additional Information: I started working on a patch, but I don't have the time test it enough (it makes xfig use mkstemp, so parts of xfig where code create tempfiles with certain suffix: eg. xfig-pid.pic, the patch loses the suffix ...) http://www.uku.fi/~jhuuskon/xfig-3.2.3d-mkstemp.diff