Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37846257
en ru br
ALT Linux repositórios
S:23.04.3-alt1

Group :: Arquivamento/Compressão
RPM: kde5-ark

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: CVE-2020-16116.patch
Download


diff --git a/kerfuffle/jobs.cpp b/kerfuffle/jobs.cpp
index fdaa48695fd9019af760ded3a99879905a0b476e..f73b56f862ed525953f6fd7d7b5217f43c315376 100644
--- a/kerfuffle/jobs.cpp
+++ b/kerfuffle/jobs.cpp
@@ -180,6 +180,14 @@ void Job::onError(const QString & message, const QString & details)
 
 void Job::onEntry(Archive::Entry *entry)
 {
+    const QString entryFullPath = entry->fullPath();
+    if (QDir::cleanPath(entryFullPath).contains(QLatin1String("../"))) {
+        qCWarning(ARK) << "Possibly malicious archive. Detected entry that could lead to a directory traversal attack:" << entryFullPath;
+        onError(i18n("Could not load the archive because it contains ill-formed entries and might be a malicious archive."), QString());
+        onFinished(false);
+        return;
+    }
+
     emit newEntry(entry);
 }
 
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009