<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>329375</bug_id>
          
          <creation_ts>2013-12-29 17:30:58 +0000</creation_ts>
          <short_desc>kscreenlock_greet insecure with multiple X screens</short_desc>
          <delta_ts>2015-01-23 11:51:41 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kscreensaver</product>
          <component>locker-qml</component>
          <version>4.11.4</version>
          <rep_platform>Ubuntu</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>314073</dup_id>
          
          <bug_file_loc>https://bugs.launchpad.net/ubuntu/+source/kde-workspace/+bug/1264821</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="TJ">kde</reporter>
          <assigned_to name="Plasma Bugs List">plasma-bugs-null</assigned_to>
          <cc>mgraesslin</cc>
    
    <cc>trebor_x</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1421382</commentid>
    <comment_count>0</comment_count>
    <who name="TJ">kde</who>
    <bug_when>2013-12-29 17:30:58 +0000</bug_when>
    <thetext>When using multiple X screens (3 in this case), kscreenlocker-greet behaves very badly and insecurely.

It appears to be drawing the desktop background image/screensaver images for all three X screens to the primary screen (0) and doesn&apos;t blank/screensave the monitors belonging to screens 1 and 2 (which leaves their contents in view), and it displays 2, maybe 3 greeter dialogs (1 may be hidden) on the primary X screen, but only accepts typed password input in 1 of them (the primary X screen&apos;s dialog).

Reading the source-code at

 ksmserver/screenlocker/greeter/greeterapp.cpp::UnlockApp::desktopResized()

it appears to iterate the screens via desktop()-&gt;screenCount() but assumes there is only one X display when showing the ScreenSaverWindow.



Reproducible: Always

Steps to Reproduce:
1. Configure multiple X screens
2. Lock
Actual Results:  
All background images and screensavers are drawn to X screen 0

Expected Results:  
Each  background image and screensaver should be rendered on the correct X screen

I&apos;m testing a possible fix which passes display()-&gt;screen(i) to the QDeclarativeView constructor.

Photographs of the screens are attached to the referenced Ubuntu bug report #1264821.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1421908</commentid>
    <comment_count>1</comment_count>
      <attachid>84383</attachid>
    <who name="TJ">kde</who>
    <bug_when>2013-12-31 18:12:34 +0000</bug_when>
    <thetext>Created attachment 84383
Render background and greeter on correct X screen

This patch is for version up to 4.11.4.

The re-factoring for Plasma 2 needs a little more research since it replaces QDeclarativeView with a QQuickView, but the same solution (passing  QApplication-&gt;display()-&gt;screen(i)v) looks to be doable if the QWidget is exchangeable for the QWindow in the QQuickView constructor.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1422403</commentid>
    <comment_count>2</comment_count>
    <who name="Martin Flöser">mgraesslin</who>
    <bug_when>2014-01-03 10:10:18 +0000</bug_when>
    <thetext>are you really using multiple X screens like :0.0 and :0.1?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1422490</commentid>
    <comment_count>3</comment_count>
    <who name="TJ">kde</who>
    <bug_when>2014-01-03 17:33:40 +0000</bug_when>
    <thetext>Don&apos;t forget :0.2!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1422496</commentid>
    <comment_count>4</comment_count>
    <who name="Martin Flöser">mgraesslin</who>
    <bug_when>2014-01-03 17:49:16 +0000</bug_when>
    <thetext>ok, so it is multi-head.

This is a very uncommon setup and I doubt any developer is able to test and verify the patch.  From a quick look at the patch looks wrong to me, because you use &quot;i&quot; as an index in QDesktopWindow::screen(). This looks crashy to me and potentially wrong. In fact in your case I expect that it&apos;s always just 0. There should be three processes with one screen each. While on a more regular setup there is just one process with three screens attached.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1493465</commentid>
    <comment_count>5</comment_count>
    <who name="Martin Flöser">mgraesslin</who>
    <bug_when>2015-01-23 11:51:41 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 314073 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>84383</attachid>
            <date>2013-12-31 18:12:34 +0000</date>
            <delta_ts>2013-12-31 18:12:34 +0000</delta_ts>
            <desc>Render background and greeter on correct X screen</desc>
            <filename>greeterapp.diff</filename>
            <type>text/plain</type>
            <size>932</size>
            <attacher name="TJ">kde</attacher>
            
              <data encoding="base64">LS0tIGtzbXNlcnZlci9zY3JlZW5sb2NrZXIvZ3JlZXRlci9ncmVldGVyYXBwLmNwcAkyMDEzLTEy
LTMxIDE1OjE0OjMyLjMzNDQ1NjQ2MSArMDAwMAorKysgLi4va2RlLXdvcmtzcGFjZS00LjEwLjUv
a3Ntc2VydmVyL3NjcmVlbmxvY2tlci9ncmVldGVyL2dyZWV0ZXJhcHAuY3BwCTIwMTMtMTItMjkg
MTQ6MzQ6MDkuMDgxMzc5ODgwICswMDAwCkBAIC0xNDIsOCArMTQyLDggQEAKICAgICBjb25zdCBi
b29sIGNhbkxvZ291dCA9IEtBdXRob3JpemVkOjphdXRob3JpemVLQWN0aW9uKCJsb2dvdXQiKSAm
JiBLQXV0aG9yaXplZDo6YXV0aG9yaXplKCJsb2dvdXQiKTsKICAgICBjb25zdCBRU2V0PFNvbGlk
OjpQb3dlck1hbmFnZW1lbnQ6OlNsZWVwU3RhdGU+IHNwZE1ldGhvZHMgPSBTb2xpZDo6UG93ZXJN
YW5hZ2VtZW50OjpzdXBwb3J0ZWRT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