Bug 1189408 (CVE-2020-24741) - VUL-0: CVE-2020-24741: libqt5-qtbase: qt: QLibrary loads libraries relative to CWD which could result in arbitrary code execution
Summary: VUL-0: CVE-2020-24741: libqt5-qtbase: qt: QLibrary loads libraries relative t...
Status: RESOLVED FIXED
Alias: CVE-2020-24741
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Major
Target Milestone: ---
Assignee: Security Team bot
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/306128/
Whiteboard: CVSSv3.1:SUSE:CVE-2020-24741:7.8:(AV:...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-12 15:33 UTC by Gabriele Sonnu
Modified: 2024-06-07 12:24 UTC (History)
4 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriele Sonnu 2021-08-12 15:33:34 UTC
An issue has been fixed in Qt versions 5.14.1 and 5.12.7 where QLibrary attempts to load plugins relative to the working directory, allowing attackers to execute arbitrary code via crafted files.

Reference:

https://bugreports.qt.io/browse/QTBUG-81272

References:
https://bugzilla.redhat.com/show_bug.cgi?id=1993132
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-24741
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-24741
http://www.cvedetails.com/cve/CVE-2020-24741/
https://bugreports.qt.io/browse/QTBUG-81272
Comment 1 Gabriele Sonnu 2021-08-12 15:35:36 UTC
Affected packages:

- SUSE:SLE-12-SP2:Update  5.6.1
- SUSE:SLE-12-SP3:Update  5.6.2
- SUSE:SLE-15:Update      5.9.4
- SUSE:SLE-15-SP1:Update  5.9.7

Patch: 

https://codereview.qt-project.org/c/qt/qtbase/+/286795
Comment 2 Max Lin 2021-09-16 10:13:04 UTC
(In reply to Gabriele Sonnu from comment #1)
> Affected packages:
> 
> - SUSE:SLE-12-SP2:Update  5.6.1

SR#252176

> - SUSE:SLE-12-SP3:Update  5.6.2

SR#252175

> - SUSE:SLE-15:Update      5.9.4

MR#252178

> - SUSE:SLE-15-SP1:Update  5.9.7

SR#252177
Comment 4 Fabian Vogt 2021-09-20 12:06:49 UTC
I don't think Qt < 5.12.0 is not affected by this bug, because it does not search platform specific library locations. The fix commit mentions 5219c37f7c98f37f078fee00fe8ca35d83ff4f5d as the cause of the issue, which is only included in 5.12.0 and later.

So this can be closed as INVALID FWICT.
Comment 5 Fabian Vogt 2021-09-21 14:20:57 UTC
(In reply to Fabian Vogt from comment #4)
> I don't think Qt < 5.12.0 is not affected by this bug, because it does not
> search platform specific library locations. The fix commit mentions
> 5219c37f7c98f37f078fee00fe8ca35d83ff4f5d as the cause of the issue, which is
> only included in 5.12.0 and later.
> 
> So this can be closed as INVALID FWICT.

I used the opensuse/leap:42.3 - :15.3 containers to validate that they're not affected. The exact reproducer of the bug report is to strace a Qt application using XCB, like:

zypper in -y xvfb-run which libqt5-qttools strace && ( xvfb-run -a -s "+iglx +render" strace -fefile qdbusviewer-qt5 |& grep Xcursor )

and checking that nothing uses paths relative to the CWD.

42.3: Not loaded as plugin:
[pid   655] open("/usr/lib64/libXcursor.so.1", O_RDONLY|O_CLOEXEC) = 

(no other CWD relative opens either)

15.0 and 15.1, absolute paths only:
[pid   504] openat(AT_FDCWD, "/lib64/libXcursor.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid   504] openat(AT_FDCWD, "/usr/lib64/libXcursor.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

On 15.2 and 15.3, it uses "haswell/", but with absolute paths, because 5.12.7 contains the fix already:
[pid   619] openat(AT_FDCWD, "/lib64/haswell/x86_64/libXcursor.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid   619] openat(AT_FDCWD, "/lib64/haswell/libXcursor.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

Reassigning to security team to close this as INVALID.
Comment 6 Swamp Workflow Management 2021-09-30 19:16:19 UTC
SUSE-SU-2021:3268-1: An update that solves one vulnerability and has one errata is now available.

Category: security (important)
Bug References: 1178600,1189408
CVE References: CVE-2020-24741
JIRA References: 
Sources used:
SUSE Linux Enterprise Server 12-SP2-BCL (src):    libqt5-qtbase-5.6.1-17.21.3

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 7 Swamp Workflow Management 2021-09-30 19:17:32 UTC
SUSE-SU-2021:3269-1: An update that solves one vulnerability and has one errata is now available.

Category: security (important)
Bug References: 1178600,1189408
CVE References: CVE-2020-24741
JIRA References: 
Sources used:
SUSE Linux Enterprise Server for SAP 15 (src):    libqt5-qtbase-5.9.4-8.29.1
SUSE Linux Enterprise Server 15-LTSS (src):    libqt5-qtbase-5.9.4-8.29.1
SUSE Linux Enterprise High Performance Computing 15-LTSS (src):    libqt5-qtbase-5.9.4-8.29.1
SUSE Linux Enterprise High Performance Computing 15-ESPOS (src):    libqt5-qtbase-5.9.4-8.29.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 12 Maintenance Automation 2023-07-13 12:41:41 UTC
SUSE-SU-2023:2816-1: An update that solves two vulnerabilities can now be installed.

Category: security (important)
Bug References: 1189408, 1211798
CVE References: CVE-2020-24741, CVE-2023-32763
Sources used:
SUSE OpenStack Cloud 9 (src): libqt5-qtbase-5.6.2-6.33.1
SUSE OpenStack Cloud Crowbar 9 (src): libqt5-qtbase-5.6.2-6.33.1
SUSE Linux Enterprise Server for SAP Applications 12 SP4 (src): libqt5-qtbase-5.6.2-6.33.1
SUSE Linux Enterprise Software Development Kit 12 SP5 (src): libqt5-qtbase-5.6.2-6.33.1
SUSE Linux Enterprise Server 12 SP4 ESPOS 12-SP4 (src): libqt5-qtbase-5.6.2-6.33.1
SUSE Linux Enterprise Server 12 SP4 LTSS 12-SP4 (src): libqt5-qtbase-5.6.2-6.33.1
SUSE Linux Enterprise High Performance Computing 12 SP5 (src): libqt5-qtbase-5.6.2-6.33.1
SUSE Linux Enterprise Server 12 SP5 (src): libqt5-qtbase-5.6.2-6.33.1
SUSE Linux Enterprise Server for SAP Applications 12 SP5 (src): libqt5-qtbase-5.6.2-6.33.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 14 Andrea Mattiazzo 2024-06-07 12:24:33 UTC
All done, closing.