Description of problem: Raphael Marichez of Gentoo reported an insecure temporary file usage flaw in QGit. (see URL for original report) The following code in dataloader.cpp is problematic: 220 bool DataLoader::doStart(SCList args, SCRef wd) { 221 222 // ensure unique names for our DataLoader instance file 223 dataFileName = "/qgit_" + QString::number((ulong)this) + ".txt"; 224 scriptFileName = "/qgit_" + QString::number((ulong)this) + ".sh"; 225 226 // create a script to redirect 'git rev-list' stdout to dataFile 227 QDir dir("/tmp"); // use a tmpfs mounted filesystem if available 228 bool foundTmpDir = (dir.exists() && dir.isReadable()); 229 scriptFileName.prepend(foundTmpDir ? "/tmp" : wd); 230 dataFileName.prepend(foundTmpDir ? "/tmp" : wd); Not only does QGit construct a predictable file name here, and doesn't check if the files already exist, which can be leveraged into information leak or arbitrary file overwrite in case they're symlinks, but later on executes one of them. This is not just problem when /tmp is mounted with noexec option, but might be exploited into arbitrary code execution under time-dependent race condition. With this said, please update as possible. Additional information: There's no CVE identifier for this issue. I will request one soon. Version-Release number of selected component (if applicable): qgit-1.5.6-1.fc7
Mitre assigne CVE-2007-4631 to this issue.
qgit-1.5.7-1.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.