diff options
| author | Thiago Macieira <thiago.macieira@intel.com> | 2023-12-13 11:37:48 -0300 |
|---|---|---|
| committer | Thiago Macieira <thiago.macieira@intel.com> | 2023-12-21 14:40:28 +0000 |
| commit | e696bec76e4f852cb28f27c50c95d3504fba559e (patch) | |
| tree | a5ca3e130793e1bd1a8e7455a343cbc65e8eef64 /src/corelib/io/qresource.cpp | |
| parent | 30e6d822327d8105d209af10d077512f21ecc12c (diff) | |
QDataStream & QResource: document their lack of security-hardening
Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-120012
Task-number: QTBUG-119178
Change-Id: I6e2677aad2ab45759db2fffd17a06af730e320d6
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/io/qresource.cpp')
| -rw-r--r-- | src/corelib/io/qresource.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp index 1bdcf246bee..e3b09e7cbd6 100644 --- a/src/corelib/io/qresource.cpp +++ b/src/corelib/io/qresource.cpp @@ -233,6 +233,19 @@ static inline ResourceList *resourceList() itself will be unmapped from memory when the last QResource that points to it is destroyed. + \section2 Corruption and Security + + The QResource class performs some checks on the file passed to determine + whether it is supported by the current version of Qt. Those tests are only + to check the file header does not request features (such as Zstandard + decompression) that have not been compiled in or that the file is not of a + future version of Qt. They do not confirm the validity of the entire file. + + QResource should not be used on files whose provenance cannot be trusted. + Applications should be designed to attempt to load only resource files + whose provenance is at least as trustworthy as that of the application + itself or its plugins. + \sa {The Qt Resource System}, QFile, QDir, QFileInfo */ |
