Bugzilla – Bug 58298
VUL-0:CVE-2004-0690: insecure tempfile: dcopserver uses tempnam due to missing configure check
Last modified: 2021-10-14 08:40:20 UTC
In KDE 3.2.x the configure check for MKSTEMP is missing. This causes dcopserver to fall back to tempnam/fopen for the creation of its temporary file, which is insecure. See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=261386 Affects NLD as well.
<!-- SBZ_reproduce --> The following command shows that tempnam is used: nm -D /opt/kde3/lib/libkdeinit_dcopserver.so|egrep 'tempnam|mkstemp' U tempnam
Created attachment 22386 [details] Patch for dcopserver (kdelibs) Attached patch fixes by using the MKSTEMPS (notice the extra S) test and by falling back to a local copy of mkstemps instead of tempnam if the system provided mkstemps is not found (but mktemps should be picked up correctly, check config.h!) Please review patch. KDE security advisory is planned for august 11, together with the other one(s).
The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the name CAN-2004-0690 to this issue.
Ok so this will be fixed together with bug 58298
bug 57486 i meant...
See also bug 58269 which is a kdelibs issue as well. And then there is bug 58271 but we still don't have a good patch it.
patch got check into SLES9. reassign to Thomas for tracking.
regarding comment #2, patch looks ok (based on widely used glibc code)
Created attachment 22564 [details] patchinfo.kdelibs3-4vulns
Created attachment 22565 [details] patchinfo-box.kdelibs3-4vulns
Created attachment 22577 [details] patchinfo.kdelibs3-3vulns
Created attachment 22578 [details] patchinfo-box.kdelibs3-3vulns
packages approved
CVE-2004-0690: CVSS v2 Base Score: 4.6 (AV:L/AC:L/Au:N/C:P/I:P/A:P)