Bug 387753 - Usage of `qmlplugindump` causes sandbox violations
Summary: Usage of `qmlplugindump` causes sandbox violations
Status: RESOLVED DOWNSTREAM
Alias: None
Product: extra-cmake-modules
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR major
Target Milestone: ---
Assignee: ecm-bugs-null@kde.org
URL: https://bugzilla.gnome.org/show_bug.c...
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-09 23:44 UTC by Elias Probst
Modified: 2017-12-19 12:59 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
sandbox.log of "sandbox qmlplugindump QtQuick.Window 2.1" (863 bytes, text/x-log)
2017-12-09 23:44 UTC, Elias Probst
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Elias Probst 2017-12-09 23:44:21 UTC
Created attachment 109279 [details]
sandbox.log of "sandbox qmlplugindump QtQuick.Window 2.1"

The usage of `qmlplugindump` causes sandbox violations, e.g. here on Gentoo when trying to build kwin since @fe9664fd8 [1]

It looks like `qmlplugindump` is not quite environment agnostic but instead tries to do all kind of stuff depending on the environment in which it is executed in, which is clearly shown by e.g. running `sandbox qmlplugindump QtQuick.Window 2.1`, (as regular user of a Plasma/Wayland session) causing at least 4 sandbox violations of which at least the one attempting to write to /dev/dri/card0 would be considered severe:

trimmed sandbox.log, full log attached:

F: chmod
P: /run/user/1000

F: mkostemp
P: /run/user/1000/wayland-cursor-shared-XXXXXX

F: open_wr
P: /dev/dri/card0

F: mkostemp
P: /run/user/1000/mesa-shared-XXXXXX



The sandbox.log of the build process (as root, no graphical session) looks similar:

F: open_wr
P: /dev/dri/renderD128
C: /usr/lib64/gstreamer-1.0/gst-plugin-scanner -l

F: open_wr                               
P: /dev/dri/card0                                                            
C: /usr/lib64/gstreamer-1.0/gst-plugin-scanner -l              

F: open_wr                                                                                             
P: /dev/video0                                 
C: /usr/lib64/qt5/bin/qmlplugindump QtMultimedia 5.0


This seems to only happen with QtQuick.Window, so I'm not sure whether that's an issue with the way ECM calls qmlplugindump, qmlplugindump itself or just QtDeclarative's "QtQuick.Window".


[1] https://phabricator.kde.org/R108:fe9664fd8
Comment 1 Elias Probst 2017-12-09 23:50:46 UTC
It looks like this is actually an upstream issue:
https://bugzilla.gnome.org/show_bug.cgi?id=744135


As documented in Gentoo's bugtracker:
https://bugs.gentoo.org/570624
Comment 2 Christophe Marin 2017-12-09 23:59:11 UTC
Downstream issue rather, according to https://bugzilla.gnome.org/show_bug.cgi?id=744135#c1