1972599cfSmrg<?xml version="1.0" encoding="UTF-8" ?> 2972599cfSmrg<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" 3972599cfSmrg "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" 4972599cfSmrg[ 5972599cfSmrg<!ENTITY % defs SYSTEM "defs.ent"> %defs; 6972599cfSmrg]> 7972599cfSmrg 8972599cfSmrg 9972599cfSmrg<!-- by TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/) 10972599cfSmrgxhtml,docbook,html,refcaption 11972599cfSmrg--> 12972599cfSmrg 13972599cfSmrg<book id="analysis"> 14972599cfSmrg 15972599cfSmrg<bookinfo> 16972599cfSmrg <title>Analysis of the X Protocol for Security Concerns</title> 17972599cfSmrg <pubdate>May 10, 1996</pubdate> 18972599cfSmrg <authorgroup> 19972599cfSmrg <author> 20972599cfSmrg <firstname>David</firstname><othername>P.</othername><surname>Wiggins</surname> 21972599cfSmrg <affiliation><orgname>X Consortium</orgname></affiliation> 22972599cfSmrg </author> 23972599cfSmrg </authorgroup> 24972599cfSmrg <releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo> 25972599cfSmrg <releaseinfo>Draft Version 2</releaseinfo> 26972599cfSmrg <copyright><year>1996</year><holder>X Consortium</holder></copyright> 27972599cfSmrg 28972599cfSmrg<legalnotice> 29972599cfSmrg<para> 30972599cfSmrgPermission is hereby granted, free of charge, to any person obtaining 31972599cfSmrga copy of this software and associated documentation files (the 32972599cfSmrg"Software"), to deal in the Software without restriction, including 33972599cfSmrgwithout limitation the rights to use, copy, modify, merge, publish, 34972599cfSmrgdistribute, sublicense, and/or sell copies of the Software, and to 35972599cfSmrgpermit persons to whom the Software is furnished to do so, subject to 36972599cfSmrgthe following conditions: 37972599cfSmrg</para> 38972599cfSmrg<para> 39972599cfSmrgThe above copyright notice and this permission notice shall be included 40972599cfSmrgin all copies or substantial portions of the Software. 41972599cfSmrg</para> 42972599cfSmrg<para> 43972599cfSmrgTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS 44972599cfSmrgOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 45972599cfSmrgMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 46972599cfSmrgIN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR 47972599cfSmrgOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 48972599cfSmrgARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 49972599cfSmrgOTHER DEALINGS IN THE SOFTWARE. 50972599cfSmrg</para> 51972599cfSmrg<para> 52972599cfSmrgExcept as contained in this notice, the name of the X Consortium shall 53972599cfSmrgnot be used in advertising or otherwise to promote the sale, use or 54972599cfSmrgother dealings in this Software without prior written authorization 55972599cfSmrgfrom the X Consortium. 56972599cfSmrg</para> 57972599cfSmrg<para>X Window System is a trademark of The Open Group.</para> 58972599cfSmrg</legalnotice> 59972599cfSmrg 60972599cfSmrg<abstract> 61972599cfSmrg<para> 62972599cfSmrgThis paper attempts to list all instances of certain types of security 63972599cfSmrgproblems in the X Protocol. Issues with authorization are not addressed. 64972599cfSmrgWe assume that a malicious client has already succeeded in connecting, 65972599cfSmrgand try to assess what harm it can then do. We propose modifications to 66972599cfSmrgthe semantics of the X Protocol to reduce these risks. 67972599cfSmrg</para> 68972599cfSmrg</abstract> 69972599cfSmrg</bookinfo> 70972599cfSmrg 71972599cfSmrg<chapter id='Definition_of_Threats'> 72972599cfSmrg<title>Definition of Threats</title> 73972599cfSmrg 74972599cfSmrg<para> 75972599cfSmrgWe analyze the X protocol for the following threats. 76972599cfSmrg</para> 77972599cfSmrg 78972599cfSmrg<variablelist> 79972599cfSmrg <varlistentry> 80972599cfSmrg <term>Theft</term> 81972599cfSmrg <listitem> 82972599cfSmrg <para> 83972599cfSmrgoccurs when a client gains access to information owned by another client 84972599cfSmrgwithout explicit permission from that other client. For this analysis, 85972599cfSmrgwe take a broad view of ownership: any information that exists in the 86972599cfSmrgserver due to the actions of a client is considered owned by that client. 87972599cfSmrgFurthermore, the client that has input focus owns keyboard events, and the 88972599cfSmrgclient that owns the window that the pointer is in owns mouse events. This 89972599cfSmrgview may reveal certain instances of "theft" that we don't care to stop, 90972599cfSmrgbut we think it is better to identify all potential candidates up front and 91972599cfSmrgcull the list later than to do a partial analysis now and plan on reanalyzing 92972599cfSmrgfor remaining holes later. 93972599cfSmrg </para> 94972599cfSmrg </listitem> 95972599cfSmrg </varlistentry> 96972599cfSmrg <varlistentry> 97972599cfSmrg <term>Denial of service</term> 98972599cfSmrg <listitem> 99972599cfSmrg <para> 100972599cfSmrgoccurs when a client causes another client or the user to lose the ability 101972599cfSmrgto perform some operation. 102972599cfSmrg </para> 103972599cfSmrg </listitem> 104972599cfSmrg </varlistentry> 105972599cfSmrg <varlistentry> 106972599cfSmrg <term>Spoofing</term> 107972599cfSmrg <listitem> 108972599cfSmrg <para> 109972599cfSmrgoccurs when a client attempts to mimic another client with the hope that 110972599cfSmrgthe user will interact with it as if it really were the mimicked client. A 111972599cfSmrgwide variety of requests may be used in a spoofing attack; we will only 112972599cfSmrgpoint out a few likely candidates. 113972599cfSmrg </para> 114972599cfSmrg </listitem> 115972599cfSmrg </varlistentry> 116972599cfSmrg <varlistentry> 117972599cfSmrg <term>Destruction</term> 118972599cfSmrg <listitem> 119972599cfSmrg <para> 120972599cfSmrgoccurs when a client causes another client to lose information in a way 121972599cfSmrgthat the client or user is likely to notice. (This does not count expected 122972599cfSmrgforms of destruction, e.g., exposures.) 123972599cfSmrg </para> 124972599cfSmrg </listitem> 125972599cfSmrg </varlistentry> 126972599cfSmrg <varlistentry> 127972599cfSmrg <term>Alteration</term> 128972599cfSmrg <listitem> 129972599cfSmrg <para> 130972599cfSmrgoccurs when a client causes another client to lose information in a way 131972599cfSmrgthat the client or user is unlikely to notice. e.g., changing one pixel in a 132972599cfSmrgdrawable. 133972599cfSmrg </para> 134972599cfSmrg </listitem> 135972599cfSmrg </varlistentry> 136972599cfSmrg</variablelist> 137972599cfSmrg 138972599cfSmrg<para> 139972599cfSmrgThe line between alteration and destruction is subjective. Security 140972599cfSmrgliterature does often distinguish between them, though not always 141972599cfSmrgexplicitly. Alteration is often considered more insidious because 142972599cfSmrgits effects may not be realized until long after it has occurred. In 143972599cfSmrgthe intervening time, each time the altered data is used, it can cause 144972599cfSmrgmore damage. 145972599cfSmrg</para> 146972599cfSmrg</chapter> 147972599cfSmrg 148972599cfSmrg<chapter id='General_security_concerns_and_remedies'> 149972599cfSmrg<title>General security concerns and remedies</title> 150972599cfSmrg 151972599cfSmrg<para> 152972599cfSmrgThe following sections discuss security problems intrinsic to the X 153972599cfSmrgProtocol. A statement of each problem is usually followed by potential 154972599cfSmrgremedies. A few words here about possible remedies will help frame the 155972599cfSmrgspecific ones described below. 156972599cfSmrg</para> 157972599cfSmrg 158972599cfSmrg<para> 159972599cfSmrgIf a client attempts a threatening operation, the server may take one of 160972599cfSmrgthe following actions, listed roughly in order of severity: 161972599cfSmrg</para> 162972599cfSmrg 163972599cfSmrg<orderedlist> 164972599cfSmrg <listitem> 165972599cfSmrg <para> 166972599cfSmrgExecute the request normally. This is the right choice when we decide that a 1675eeb4e8fSmrgparticular threat is not serious enough to worry about. 168972599cfSmrg </para> 169972599cfSmrg </listitem> 170972599cfSmrg <listitem> 171972599cfSmrg <para> 172972599cfSmrgExecute the request in some modified form, e.g., substitute different 173972599cfSmrgvalues for some of the request fields, or edit the reply. 174972599cfSmrg </para> 175972599cfSmrg </listitem> 176972599cfSmrg <listitem> 177972599cfSmrg <para> 178972599cfSmrgArrange to ask the user what to do, given some subset of the other choices 179972599cfSmrgin this list. This must be used sparingly because of the performance impact. 180972599cfSmrg </para> 181972599cfSmrg </listitem> 182972599cfSmrg <listitem> 183972599cfSmrg <para> 184972599cfSmrgTreat the request as a no-op. If the client will probably not notice, or 185972599cfSmrgif it seems likely that the intent was benign, this is a good choice. 186972599cfSmrg </para> 187972599cfSmrg </listitem> 188972599cfSmrg <listitem> 189972599cfSmrg <para> 190972599cfSmrgSend a protocol error to the client. If the client will be confused enough 191972599cfSmrgby the other options that it will probably crash or become useless anyway, 192972599cfSmrgor if it seems likely that the intent was malicious, this is a good choice. 193972599cfSmrg </para> 194972599cfSmrg <para> 195972599cfSmrgKill the client. This might be the right action if there is no doubt 196972599cfSmrgthat the client is hostile. 197972599cfSmrg </para> 198972599cfSmrg </listitem> 199972599cfSmrg</orderedlist> 200972599cfSmrg 201972599cfSmrg<para> 202972599cfSmrgIn most cases we present the one option that seems most appropriate to 203972599cfSmrgcounter the threat, taking into account the seriousness of the threat, the 204972599cfSmrgimplementation difficulty, and the impact on applications. Our initial bias 205972599cfSmrgis to err on the side of stronger security, with the accompanying tighter 206972599cfSmrgrestrictions. As we uncover important operations and applications that the new 207972599cfSmrgrestrictions interfere with, we can apply selective loosening to allow 208972599cfSmrgthe desired functionality. 209972599cfSmrg</para> 210972599cfSmrg 211972599cfSmrg<para> 212972599cfSmrgIn some cases we will suggest returning an Access error where the X protocol 213972599cfSmrgdoes not explicitly allow one. These new Access errors arise when a client 214972599cfSmrgcan only perform a (non-empty) subset of the defined operations on a 2155eeb4e8fSmrgresource. The disallowed operations cause Access errors. The resource at 216972599cfSmrgissue is usually a root window. 217972599cfSmrg</para> 218972599cfSmrg 219972599cfSmrg<sect1 id='Access_to_Server_Resources'> 220972599cfSmrg<title>Access to Server Resources</title> 221972599cfSmrg<para> 222972599cfSmrgThe X protocol allows clients to manipulate resources (objects) belonging to 223972599cfSmrgother clients or to the server. Any request that specifies a resource ID is 224972599cfSmrgvulnerable to some of the above threats. Such requests also provide a way for a 225972599cfSmrgclient to guess resource IDs of other clients. A client can make educated 226972599cfSmrgguesses for possible resource IDs, and if the request succeeds, it knows it has 227972599cfSmrgdetermined a valid resource ID. We call this "resource ID guessing" in the list 228972599cfSmrgbelow. 229972599cfSmrg</para> 230972599cfSmrg 231972599cfSmrg<para> 232972599cfSmrgOne likely defense against these problems is to have the server send an 233972599cfSmrgappropriate protocol error to deny the existence of any resource specified 234972599cfSmrgby a client that doesn't belong to that client. A variation on this policy 235972599cfSmrglets cooperating groups of clients access each other's resources, but not 236972599cfSmrgthose of other groups. The Broadway project will initially use a less general 237972599cfSmrgform of this idea by having two groups, trusted and untrusted. Trusted 238972599cfSmrgclients can do everything that X clients can do today. They will be protected 239972599cfSmrgfrom untrusted clients in ways described below. Untrusted clients will 240972599cfSmrgnot be protected from each other. Though this will be the initial design, 241972599cfSmrgwe need to make sure there is a growth path to multiple (more than two) 242972599cfSmrggroups. 243972599cfSmrg</para> 244972599cfSmrg 245972599cfSmrg<para> 246972599cfSmrgMost of the time, applications never access server resources that aren't 247972599cfSmrgtheir own, so the impact of disallowing such accesses should be minimal. 248972599cfSmrgThere are a few notable exceptions, most of which will be discussed under 249972599cfSmrgthe relevant protocol requests. They are: ICCCM selection transfer, Motif 250972599cfSmrgdrag and drop, and server-global resources like the root window and default 251972599cfSmrgcolormap. Another major exception is the window manager, which routinely 252972599cfSmrgmanipulates windows of other applications. The solution for window managers 253972599cfSmrgis to always run them as trusted applications. 254972599cfSmrg</para> 255972599cfSmrg 256972599cfSmrg<para> 257972599cfSmrgThe implementation difficulty of limiting access to resources should not 258972599cfSmrgbe large. All resource accesses eventually funnel down to one of two 259972599cfSmrgfunctions in <dix/resource.c>: 260972599cfSmrg<function>LookupIDByType</function> and 261972599cfSmrg<function>LookupIDByClass</function>. A few lines of checking at 262972599cfSmrgthe top of these functions will form the heart of this defense. There is a 263972599cfSmrgsmall problem because these functions are not told which client is doing the 264972599cfSmrglookup, but that can be solved either by adding a client parameter (probably 265972599cfSmrgas a new function to preserve compatibility), or by using the server global 266972599cfSmrgrequestingClient. 267972599cfSmrg</para> 268972599cfSmrg 269972599cfSmrg<note> 270972599cfSmrg<para> 271972599cfSmrgISSUE: are we really going to be able to get away with hiding trusted 272972599cfSmrgresources, or will things like Motif drag and drop force us to expose 273972599cfSmrgthem? (Either way, the operations that untrusted clients can do to 274972599cfSmrgtrusted resources will have to be limited.) Is there something in Xt 275972599cfSmrgor the ICCCM that breaks if you hide resources? 276972599cfSmrg</para> 277972599cfSmrg</note> 278972599cfSmrg 279972599cfSmrg</sect1> 280972599cfSmrg 281972599cfSmrg<sect1 id='Denial_of_Service'> 282972599cfSmrg<title>Denial of Service</title> 283972599cfSmrg 284972599cfSmrg<sect2 id='Memory_Exhaustion'> 285972599cfSmrg<title>Memory Exhaustion</title> 286972599cfSmrg 287972599cfSmrg<para> 288972599cfSmrgAny request that causes the server to consume resources (particularly 289972599cfSmrgmemory) can be used in a denial of service attack. A client can use such 290972599cfSmrgrequests repeatedly until the server runs out of memory. When that 291972599cfSmrghappens, the server will either crash or be forced to send Alloc errors. 292972599cfSmrgThe most obvious candidates are resource creation requests, 293972599cfSmrge.g., CreatePixmap, but in reality a large percentage of requests cause 294972599cfSmrgmemory allocation, if only temporarily, depending on the server 295972599cfSmrgimplementation. For this reason, the list of requests subject to this 296972599cfSmrgform of denial of service will be necessarily incomplete. 297972599cfSmrg</para> 298972599cfSmrg 299972599cfSmrg<para> 300972599cfSmrgTo address this form of denial of service, the server could set 301972599cfSmrgper-client quotas on memory consumption. When the limit is surpassed, 302972599cfSmrgthe server could return Alloc errors. The application impact is minimal 303972599cfSmrgas long as the application stays within quota. The implementation difficulty 304972599cfSmrgis another story. 305972599cfSmrg</para> 306972599cfSmrg 307972599cfSmrg<para> 308972599cfSmrgConceptually, it seems easy: simply have a way to set the limit, and on 309972599cfSmrgevery memory (de)allocation operation, update the client's current usage, 310972599cfSmrgand return an error if the client is over the limit. The first problem 311972599cfSmrgis something we've already touched on: the allocator functions aren't told 312972599cfSmrgwhich client the allocation belongs to. Unlike resource lookups, allocations 313972599cfSmrgare done in too many places to consider a new interface that passes the 314972599cfSmrgclient, so using the global requestingClient is practically mandatory. 315972599cfSmrg</para> 316972599cfSmrg 317972599cfSmrg<para> 318972599cfSmrgThe problems run deeper. The logical thing for the allocator to do if the 319972599cfSmrgclient is over its limit is to return NULL, indicating allocation failure. 320972599cfSmrgUnfortunately, there are many places in the server that will react badly 321972599cfSmrgif this happens. Most of these places, but not all, are "protected" by 322972599cfSmrgsetting the global variable Must_have_memory to True around the delicate 323972599cfSmrgcode. We could help the problem by skipping the limit check if 324972599cfSmrgMust_have_memory is True. The best solution would be to bullet-proof the 325972599cfSmrgserver against allocation failures, but that is beyond the scope of Broadway. 326972599cfSmrgAnother consideration is that the additional checking may have a measurable 327972599cfSmrgperformance impact, since the server does frequent allocations. 328972599cfSmrg</para> 329972599cfSmrg 330972599cfSmrg<para> 331972599cfSmrgA third problem is that there is no portable way to determine the size of 332972599cfSmrga chunk of allocated memory given just a pointer to the chunk, and that's 333972599cfSmrgall you have inside <function>Xrealloc</function> and 334972599cfSmrg<function>Xfree</function>. The server could compensate by recording the 335972599cfSmrgsizes itself somewhere, but that would be wasteful of memory, since the 336972599cfSmrgmalloc implementation also must be recording block sizes. On top of that, the 337972599cfSmrgredundant bookkeeping would hurt performance. One solution is to use a custom 338972599cfSmrgmalloc that has the needed support, but that too seems beyond the scope of 339972599cfSmrgBroadway. 340972599cfSmrg</para> 341972599cfSmrg 342972599cfSmrg<para> 343972599cfSmrgConsidering all of this, we think it is advisable to defer solving the memory 344972599cfSmrgexhaustion problem to a future release. Keep this in mind when you see quotas 345972599cfSmrgmentioned as a defense in the list below. 346972599cfSmrg</para> 347972599cfSmrg 348972599cfSmrg</sect2> 349972599cfSmrg 350972599cfSmrg 351972599cfSmrg<sect2 id='CPU_Monopolization'> 352972599cfSmrg<title>CPU Monopolization</title> 353972599cfSmrg 354972599cfSmrg<para> 355972599cfSmrgAnother general way that a client can cause denial of service is to flood 356972599cfSmrgthe server with requests. The server will spend a large percentage of its 357972599cfSmrgtime servicing those requests, possibly starving other clients and certainly 358972599cfSmrghurting performance. Every request can be used for flooding, so we will 359972599cfSmrgnot bother to list flooding on every request. A variation on this attack is 360972599cfSmrgto flood the server with new connection attempts. 361972599cfSmrg</para> 362972599cfSmrg 363972599cfSmrg<para> 364972599cfSmrgTo reduce the effectiveness of flooding, the server could use a different 365972599cfSmrgscheduling algorithm that throttles clients that are monopolizing the 366972599cfSmrgserver, or it could simply favor trusted clients over untrusted ones. 367972599cfSmrgApplications cannot depend on a particular scheduling algorithm anyway, 368972599cfSmrgso changing it should not affect them. The Synchronization extension 369972599cfSmrgspecifies a way to set client priorities, and a simple priority scheduler 370972599cfSmrgalready exists in the server to support it, so this should be simple to add. 371972599cfSmrg</para> 372972599cfSmrg 373972599cfSmrg</sect2> 374972599cfSmrg</sect1> 375972599cfSmrg</chapter> 376972599cfSmrg 377972599cfSmrg 378972599cfSmrg<chapter id='Security_concerns_with_specific_window_attributes'> 379972599cfSmrg<title>Security concerns with specific window attributes</title> 380972599cfSmrg 381972599cfSmrg<sect1 id='Background_pixmap'> 382972599cfSmrg<title>Background-pixmap</title> 383972599cfSmrg<para> 384972599cfSmrgClients can use windows with the background-pixmap attribute set to None 385972599cfSmrg(hereafter "background none windows") to obtain images of other windows. A 386972599cfSmrgbackground none window never paints its own background, so whatever happened 387972599cfSmrgto be on the screen when the window was mapped can be read from the 388972599cfSmrgbackground none window with GetImage. This may well contain data from other 389972599cfSmrgwindows. The CreateWindow and ChangeWindowAttributes requests can set the 390972599cfSmrgbackground-pixmap attribute set to None, and many window operations can cause 391972599cfSmrgdata from other windows to be left in a background none window, including 392972599cfSmrg<function>ReparentWindow</function>, 393972599cfSmrg<function>MapWindow</function>, 394972599cfSmrg<function>MapSubwindows</function>, 395972599cfSmrg<function>ConfigureWindow</function>, and 396972599cfSmrg<function>CirculateWindow</function>. 397972599cfSmrg</para> 398972599cfSmrg 399972599cfSmrg<para> 400972599cfSmrgBackground none windows can also be used to cause apparent alteration. 401972599cfSmrgA client can create a window with background none and draw to it. The drawing 402972599cfSmrgwill appear to the user to be in the windows below the background none window. 403972599cfSmrg</para> 404972599cfSmrg 405972599cfSmrg<para> 406972599cfSmrgTo remedy these problems, the server could substitute a well-defined 407972599cfSmrgbackground when a client specifies None. Ideally the substituted background 408972599cfSmrgwould look different enough from other windows that the user wouldn't be 409972599cfSmrgconfused. A tile depicting some appropriate international symbol might be 410972599cfSmrgreasonable. We believe that there are few applications that actually rely on 411972599cfSmrgbackground none semantics, and those that do will be easy for the user to 412972599cfSmrgidentify because of the distinctive tile. Implementation should not be a 413972599cfSmrgproblem either. Luckily, the window background cannot be retrieved through 414972599cfSmrgthe X protocol, so we won't have to maintain any illusions about its value. 415972599cfSmrg</para> 416972599cfSmrg 417972599cfSmrg<note> 418972599cfSmrg<para> 419972599cfSmrgISSUE: Some vendors have extensions to let you query the window background. Do 4209dd7914aSmrgwe need to accommodate that? 421972599cfSmrg</para> 422972599cfSmrg</note> 423972599cfSmrg 424972599cfSmrg<note> 425972599cfSmrg<para> 426972599cfSmrgISSUE: Will this lead to unacceptable application breakage? Could the server be 427972599cfSmrgsmarter, only painting with the well-defined background when the window actually 428972599cfSmrgcontains bits from trusted windows? 429972599cfSmrg</para> 430972599cfSmrg</note> 431972599cfSmrg 432972599cfSmrg</sect1> 433972599cfSmrg 434972599cfSmrg<sect1 id='ParentRelative_and_CopyFromParent'> 435972599cfSmrg<title>ParentRelative and CopyFromParent</title> 436972599cfSmrg 437972599cfSmrg<para> 438972599cfSmrgSeveral window attributes can take on special values that cause them to 439972599cfSmrgreference (ParentRelative) or copy (CopyFromParent) the same attribute from 440972599cfSmrgthe window's parent. This fits our definition of theft. The window 441972599cfSmrgattributes are class, background-pixmap, border-pixmap, and colormap. All 442972599cfSmrgof these can be set with <function>CreateWindow</function>; all but class 443972599cfSmrgcan be set with <function>ChangeWindowAttributes</function>. 444972599cfSmrg</para> 445972599cfSmrg 446972599cfSmrg<para> 447972599cfSmrgThese forms of theft aren't particularly serious, so sending an error 448972599cfSmrgdoesn't seem appropriate. Substitution of different attribute values seems 449972599cfSmrgto be the only reasonable option, and even that is likely to cause trouble 450972599cfSmrgfor clients. Untrusted clients are already going to be prevented from 451972599cfSmrgcreating windows that are children of trusted clients (see CreateWindow 452972599cfSmrgbelow). We recommend that nothing more be done to counter this threat. 453972599cfSmrg</para> 454972599cfSmrg 455972599cfSmrg</sect1> 456972599cfSmrg 457972599cfSmrg<sect1 id='Override_redirect'> 458972599cfSmrg<title>Override-redirect</title> 459972599cfSmrg<para> 460972599cfSmrgWindows with the override-redirect bit set to True are generally ignored by 461972599cfSmrgthe window manager. A client can map an override-redirect window that covers 462972599cfSmrgmost or all of the screen, causing denial of service since other applications 463972599cfSmrgwon't be visible. 464972599cfSmrg</para> 465972599cfSmrg 466972599cfSmrg<para> 467972599cfSmrgTo prevent this, the server could prevent more than a certain percentage 468972599cfSmrg(configurable) the of screen area from being covered by override-redirect 469972599cfSmrgwindows of untrusted clients. 470972599cfSmrg</para> 471972599cfSmrg 472972599cfSmrg<para> 473972599cfSmrgOverride-redirect windows also make some spoofing attacks easier since the 474972599cfSmrgclient can more carefully control the presentation of the window to mimic 475972599cfSmrganother client. Defenses against spoofing will be given under 476972599cfSmrg<xref linkend='MapWindow' xrefstyle='select: title'/> 477972599cfSmrg. 478972599cfSmrg</para> 479972599cfSmrg 480972599cfSmrg</sect1> 481972599cfSmrg</chapter> 482972599cfSmrg 483972599cfSmrg<chapter id='Security_concerns_with_specific_requests'> 484972599cfSmrg<title>Security concerns with specific requests</title> 485972599cfSmrg 486972599cfSmrg<para> 487972599cfSmrgTo reduce the space needed to discuss 120 requests, most of the following 488972599cfSmrgsections use a stylized format. A threat is given, followed by an 489972599cfSmrgimperative statement. The implied subject is an untrusted client, and the 490972599cfSmrgobject is usually a trusted client. Following that, another statement 491972599cfSmrgstarting with "Defense:" recommends a countermeasure for the preceding 492972599cfSmrgthreat(s). 493972599cfSmrg</para> 494972599cfSmrg 495972599cfSmrg<para> 496972599cfSmrgResources owned by the server, such as the root window and the default 497972599cfSmrgcolormap, are considered to be owned by a trusted client. 498972599cfSmrg</para> 499972599cfSmrg 500972599cfSmrg<sect1 id='CreateWindow'> 501972599cfSmrg<title>CreateWindow</title> 502972599cfSmrg 503972599cfSmrg<para> 504972599cfSmrgAlteration: create a window as a child of another client's window, altering 505972599cfSmrgits list of children. 506972599cfSmrg</para> 507972599cfSmrg 508972599cfSmrg<para> 509972599cfSmrgDefense: send Window error. Specifying the root window as the parent will 510972599cfSmrghave to be allowed, though. 511972599cfSmrg</para> 512972599cfSmrg 513972599cfSmrg<para> 514972599cfSmrgTheft: create an InputOnly window or a window with background none on top 515972599cfSmrgof other clients' windows, select for keyboard/mouse input on that window, 516972599cfSmrgand steal the input. The input can be resent using SendEvent or an input 517972599cfSmrgsynthesis extension so that the snooped application continues to function, 518972599cfSmrgthough this won't work convincingly with the background none case because the 519972599cfSmrgdrawing will be clipped. 520972599cfSmrg</para> 521972599cfSmrg 522972599cfSmrg<para> 523972599cfSmrgDefense: send an error if a top-level InputOnly window is created 524972599cfSmrg(or reparented to the root). Countermeasures for background none and 525972599cfSmrgSendEvent are discussed elsewhere. 526972599cfSmrg</para> 527972599cfSmrg 528972599cfSmrg<note> 529972599cfSmrg<para> 530972599cfSmrgISSUE: The Motif drag and drop protocol creates and maps such a window (at 531972599cfSmrg-100, -100, size 10x10) to "cache frequently needed data on window properties 532972599cfSmrgto reduce roundtrip server requests." Proposed solution: we could only send an 533972599cfSmrgerror if the window is visible, which would require checking in, MapWindow, 534972599cfSmrgConfigureWindow, and ReparentWindow. 535972599cfSmrg</para> 536972599cfSmrg</note> 537972599cfSmrg 538972599cfSmrg<para> 539972599cfSmrgTheft: resource ID guessing (parent, background-pixmap, border-pixmap, colormap, 540972599cfSmrgand cursor). 541972599cfSmrg</para> 542972599cfSmrg<para> 543972599cfSmrgDefense: send Window, Pixmap, Colormap, or Cursor error. 544972599cfSmrg</para> 545972599cfSmrg<para> 546972599cfSmrgDenial of service: create windows until the server runs out of memory. 547972599cfSmrg</para> 548972599cfSmrg<para> 549972599cfSmrgDefense: quotas. 550972599cfSmrg</para> 551972599cfSmrg<para> 552972599cfSmrgAlso 553972599cfSmrg<xref linkend='Security_concerns_with_specific_window_attributes' xrefstyle='select: title'/> 554972599cfSmrg</para> 555972599cfSmrg</sect1> 556972599cfSmrg 557972599cfSmrg 558972599cfSmrg<sect1 id='ChangeWindowAttributes'> 559972599cfSmrg<title>ChangeWindowAttributes</title> 560972599cfSmrg 561972599cfSmrg<para> 562972599cfSmrgAlteration: change the attributes of another client's window. 563972599cfSmrg</para> 564972599cfSmrg<para> 565972599cfSmrgTheft: select for events on another client's window. 566972599cfSmrg</para> 567972599cfSmrg<para> 568972599cfSmrgDefense for both of the above: send Window error. 569972599cfSmrg</para> 570972599cfSmrg 571972599cfSmrg<note> 572972599cfSmrg<para> 573972599cfSmrgISSUE: The Motif drop protocol states that "the initiator should select for 574972599cfSmrgDestroyNotify on the destination window such that it is aware of a potential 575972599cfSmrgreceiver crash." This will be a problem if the initiator is an untrusted 576972599cfSmrgwindow and the destination is trusted. Can the server, perhaps with the help 577972599cfSmrgof the security manager, recognize that a drop is in progress and allow the 578972599cfSmrgDestroyNotify event selection in this limited case? 579972599cfSmrg</para> 580972599cfSmrg</note> 581972599cfSmrg 582972599cfSmrg<note> 583972599cfSmrg<para> 584972599cfSmrgISSUE: The Motif pre-register drag protocol probably requires the initiator 585972599cfSmrgto select for Enter/LeaveNotify on all top-level windows. Same problem as 586972599cfSmrgthe previous issue. 587972599cfSmrg</para> 588972599cfSmrg</note> 589972599cfSmrg 590972599cfSmrg<para> 591972599cfSmrgTheft: resource ID guessing (background-pixmap, border-pixmap, colormap, and 592972599cfSmrgcursor). 593972599cfSmrg</para> 594972599cfSmrg 595972599cfSmrg<para> 596972599cfSmrgDefense: send Pixmap, Colormap, or Cursor error. 597972599cfSmrg</para> 598972599cfSmrg<para> 599972599cfSmrgAlso 600972599cfSmrg<xref linkend='Security_concerns_with_specific_window_attributes' xrefstyle='select: title'/> 601972599cfSmrg</para> 602972599cfSmrg 603972599cfSmrg</sect1> 604972599cfSmrg 605972599cfSmrg<sect1 id='GetWindowAttributes'> 606972599cfSmrg<title>GetWindowAttributes</title> 607972599cfSmrg 608972599cfSmrg<para> 609972599cfSmrgTheft: get the attributes of another client's window. 610972599cfSmrg</para> 611972599cfSmrg<para> 612972599cfSmrgTheft: resource ID guessing (window). 613972599cfSmrg</para> 614972599cfSmrg<para> 615972599cfSmrgDefense for both of the above: send Window error. 616972599cfSmrg</para> 617972599cfSmrg 618972599cfSmrg</sect1> 619972599cfSmrg 620972599cfSmrg<sect1 id='DestroyWindow_DestroySubwindows'> 621972599cfSmrg<title>DestroyWindow, DestroySubwindows</title> 622972599cfSmrg 623972599cfSmrg<para> 624972599cfSmrgDestruction: destroy another client's window. 625972599cfSmrg</para> 626972599cfSmrg<para> 627972599cfSmrgTheft: resource ID guessing (window). 628972599cfSmrg</para> 629972599cfSmrg<para> 630972599cfSmrgDefense for both of the above: send Window error. 631972599cfSmrg</para> 632972599cfSmrg</sect1> 633972599cfSmrg 634972599cfSmrg<sect1 id='ChangeSaveSet'> 635972599cfSmrg<title>ChangeSaveSet</title> 636972599cfSmrg 637972599cfSmrg<para> 638972599cfSmrgAlteration: cause another client's windows to be reparented to the root when 639972599cfSmrgthis client disconnects (only if the other client's windows are subwindows of 640972599cfSmrgthis client's windows). 641972599cfSmrg</para> 642972599cfSmrg 643972599cfSmrg<para> 644972599cfSmrgDefense: process the request normally. The trusted client gives away some of 645972599cfSmrgits protection by creating a subwindow of an untrusted window. 646972599cfSmrg</para> 647972599cfSmrg 648972599cfSmrg<para> 649972599cfSmrgTheft: resource ID guessing (window). 650972599cfSmrg</para> 651972599cfSmrg 652972599cfSmrg<para> 653972599cfSmrgDefense: send Window error. 654972599cfSmrg</para> 655972599cfSmrg</sect1> 656972599cfSmrg 657972599cfSmrg 658972599cfSmrg<sect1 id='MapWindow'> 659972599cfSmrg<title>MapWindow</title> 660972599cfSmrg 661972599cfSmrg<para> 662972599cfSmrgSpoofing: map a window that is designed to resemble a window of another client. 663972599cfSmrgAdditional requests will probably be needed to complete the illusion. 664972599cfSmrg</para> 665972599cfSmrg 666972599cfSmrg<para> 667972599cfSmrgDefense: 668972599cfSmrg</para> 669972599cfSmrg 670972599cfSmrg<para> 671972599cfSmrgWe consider spoofing to be a significant danger only if the user is convinced 672972599cfSmrgto interact with the spoof window. The defense centers on providing enough 673972599cfSmrginformation to enable the user to know where keyboard, mouse, and extension 674972599cfSmrgdevice input is going. To accomplish this, the server will cooperate with the 675972599cfSmrgsecurity manager, an external process. The server will provide the following 676972599cfSmrgfacilities to the security manager: 677972599cfSmrg</para> 678972599cfSmrg 679972599cfSmrg<para> 680972599cfSmrg1. A way to create a single window that is unobscurable by any window of any 681972599cfSmrgother client, trusted or untrusted. It needs to be unobscurable so that it is 682972599cfSmrgspoof-proof. 683972599cfSmrg</para> 684972599cfSmrg 685972599cfSmrg<note> 686972599cfSmrg<para> 687972599cfSmrgISSUE: is a weaker form of unobscurability better? Should the window be 688972599cfSmrgobscurable by trusted windows, for example? 689972599cfSmrg</para> 690972599cfSmrg</note> 691972599cfSmrg 692972599cfSmrg<note> 693972599cfSmrg<para> 694972599cfSmrgISSUE: does unobscurable mean that it is a child of the root that is always 695972599cfSmrgon top in the stacking order? 696972599cfSmrg</para> 697972599cfSmrg</note> 698972599cfSmrg 699972599cfSmrg<para> 700972599cfSmrg2. A way to determine if a given window ID belongs to an untrusted client. 701972599cfSmrg</para> 702972599cfSmrg 703972599cfSmrg<para> 704972599cfSmrgThe security manager will need to select for the existing events 705972599cfSmrgFocusIn, FocusOut, EnterNotify, LeaveNotify, DeviceFocusIn, and 706972599cfSmrgDeviceFocusOut on all windows to track what window(s) the user's input is 707972599cfSmrggoing to. Using the above server facilities, it can reliably display the 708972599cfSmrgtrusted/untrusted status of all clients currently receiving input. 709972599cfSmrg</para> 710972599cfSmrg 711972599cfSmrg<note> 712972599cfSmrg<para> 713972599cfSmrgISSUE: is it too much to ask the security manager to select for all these 714972599cfSmrgevents on every window? Do we need to provide new events that you select 715972599cfSmrgfor *on the device* that tell where the device is focused? 716972599cfSmrg</para> 717972599cfSmrg</note> 718972599cfSmrg 719972599cfSmrg<para> 720972599cfSmrgNone of this should have any application impact. 721972599cfSmrg</para> 722972599cfSmrg 723972599cfSmrg<para> 724972599cfSmrgThe unobscurable window may be tricky to implement. There is already some 725972599cfSmrgmachinery in the server to make an unobscurable window for the screen saver, 726972599cfSmrgwhich may help but may also get in the way now that we have to deal with two 727972599cfSmrgunobscurable windows. 728972599cfSmrg</para> 729972599cfSmrg 730972599cfSmrg</sect1> 731972599cfSmrg 732972599cfSmrg 733972599cfSmrg<sect1 id='Window_Operations'> 734972599cfSmrg<title>Window Operations</title> 735972599cfSmrg 736972599cfSmrg<para> 737972599cfSmrgSpecifically, ReparentWindow, MapWindow, MapSubwindows, UnmapWindow, 738972599cfSmrgUnmapSubwindows, ConfigureWindow, and CirculateWindow. 739972599cfSmrg</para> 740972599cfSmrg 741972599cfSmrg<para> 742972599cfSmrgAlteration: manipulate another client's window. 743972599cfSmrg</para> 744972599cfSmrg 745972599cfSmrg<para> 746972599cfSmrgTheft: resource ID guessing (window, sibling). 747972599cfSmrg</para> 748972599cfSmrg 749972599cfSmrg<para> 750972599cfSmrgDefense for both of the above: send a Window error unless it is a root 751972599cfSmrgwindow, in which case we should send an Access error. 752972599cfSmrg</para> 753972599cfSmrg 754972599cfSmrg</sect1> 755972599cfSmrg 756972599cfSmrg<sect1 id='GetGeometry'> 757972599cfSmrg<title>GetGeometry</title> 758972599cfSmrg 759972599cfSmrg<para> 760972599cfSmrgTheft: get the geometry of another client's drawable. 761972599cfSmrg</para> 762972599cfSmrg 763972599cfSmrg<para> 764972599cfSmrgTheft: resource ID guessing (drawable). 765972599cfSmrg</para> 766972599cfSmrg<para> 767972599cfSmrgDefense for both of the above: send Drawable error. However, root windows 768972599cfSmrgwill be allowed. 769972599cfSmrg</para> 770972599cfSmrg 771972599cfSmrg</sect1> 772972599cfSmrg 773972599cfSmrg<sect1 id='QueryTree'> 774972599cfSmrg<title>QueryTree</title> 775972599cfSmrg 776972599cfSmrg<para> 777972599cfSmrgTheft: resource ID guessing (window). 778972599cfSmrg</para> 779972599cfSmrg 780972599cfSmrg<para> 781972599cfSmrgDefense: send Window error. 782972599cfSmrg</para> 783972599cfSmrg 784972599cfSmrg<para> 785972599cfSmrgTheft: discover window IDs that belong to other clients. 786972599cfSmrg</para> 787972599cfSmrg 788972599cfSmrg<para> 789972599cfSmrgDefense: For the child windows, censor the reply by removing window IDs that 790972599cfSmrgbelong to trusted clients. Allow the root window to be returned. For the parent 791972599cfSmrgwindow, if it belongs to a trusted client, return the closest ancestor window 792972599cfSmrgthat belongs to an untrusted client, or if such a window does not exist, 793972599cfSmrgreturn the root window for the parent window. 794972599cfSmrg</para> 795972599cfSmrg 796972599cfSmrg<note> 797972599cfSmrg<para> 798972599cfSmrgISSUE: will some applications be confused if we filter out the window manager 799972599cfSmrgframe window(s), or other windows between the queried window and the root 800972599cfSmrgwindow? 801972599cfSmrg</para> 802972599cfSmrg</note> 803972599cfSmrg 804972599cfSmrg<note> 805972599cfSmrg<para> 806972599cfSmrgISSUE: the Motif drag protocol (both preregister and dynamic) needs to be able 807972599cfSmrgto locate other top-level windows for potential drop sites. See also 808972599cfSmrg<xref linkend='Access_to_Server_Resources' xrefstyle='select: title'/> 809972599cfSmrg. 810972599cfSmrg</para> 811972599cfSmrg</note> 812972599cfSmrg 813972599cfSmrg</sect1> 814972599cfSmrg 815972599cfSmrg<sect1 id='InternAtom'> 816972599cfSmrg<title>InternAtom</title> 817972599cfSmrg 818972599cfSmrg<para> 819972599cfSmrgTheft: discover atom values of atoms interned by other clients. This lets you 820972599cfSmrgdetermine if a specific set of atoms has been interned, which may lead to other 821972599cfSmrginferences. 822972599cfSmrg</para> 823972599cfSmrg<para> 824972599cfSmrgDefense: This is a minor form of theft. Blocking it will interfere with many 825972599cfSmrgtypes of inter-client communication. We propose to do nothing about this 826972599cfSmrgthreat. 827972599cfSmrg</para> 828972599cfSmrg 829972599cfSmrg<para> 830972599cfSmrgDenial of service: intern atoms until the server runs out of memory. 831972599cfSmrg</para> 832972599cfSmrg 833972599cfSmrg<para> 834972599cfSmrgDefense: quotas. 835972599cfSmrg</para> 836972599cfSmrg 837972599cfSmrg 838972599cfSmrg</sect1> 839972599cfSmrg 840972599cfSmrg<sect1 id='GetAtomName'> 841972599cfSmrg<title>GetAtomName</title> 842972599cfSmrg 843972599cfSmrg<para> 844972599cfSmrgTheft: discover atom names of atoms interned by other clients. This lets you 845972599cfSmrgdetermine if a specific set of atoms has been interned, which may lead to other 846972599cfSmrginferences. 847972599cfSmrg</para> 848972599cfSmrg 849972599cfSmrg<para> 850972599cfSmrgDefense: This is a minor form of theft. We propose to do nothing about this 851972599cfSmrgthreat. 852972599cfSmrg</para> 853972599cfSmrg 854972599cfSmrg</sect1> 855972599cfSmrg 856972599cfSmrg<sect1 id='ChangeProperty'> 857972599cfSmrg<title>ChangeProperty</title> 858972599cfSmrg 859972599cfSmrg<para> 860972599cfSmrgAlteration: change a property on another client's window or one that was 861972599cfSmrgstored by another client. 862972599cfSmrg</para> 863972599cfSmrg 864972599cfSmrg<para> 865972599cfSmrgTheft: resource ID guessing (window). 866972599cfSmrg</para> 867972599cfSmrg 868972599cfSmrg<para> 869972599cfSmrgDefense for both of the above: send Window error. 870972599cfSmrg</para> 871972599cfSmrg 872972599cfSmrg<note> 873972599cfSmrg<para> 874972599cfSmrgISSUE: Selection transfer requires the selection owner to change a property 875972599cfSmrgon the requestor's window. Does the security manager get us out of this? 876972599cfSmrgDoes the server notice the property name and window passed in 877972599cfSmrgConvertSelection and temporarily allow that window property to be written? 878972599cfSmrg</para> 879972599cfSmrg</note> 880972599cfSmrg 881972599cfSmrg<note> 882972599cfSmrg<para> 883972599cfSmrgISSUE: should certain root window properties be writable? 884972599cfSmrg</para> 885972599cfSmrg</note> 886972599cfSmrg 887972599cfSmrg<para> 888972599cfSmrgDenial of service: store additional property data until the server 889972599cfSmrgruns out of memory. 890972599cfSmrg</para> 891972599cfSmrg 892972599cfSmrg<para> 893972599cfSmrgDefense: quotas. 894972599cfSmrg</para> 895972599cfSmrg</sect1> 896972599cfSmrg 897972599cfSmrg<sect1 id='DeleteProperty'> 898972599cfSmrg<title>DeleteProperty</title> 899972599cfSmrg 900972599cfSmrg<para> 901972599cfSmrgDestruction: delete a property stored by another client. 902972599cfSmrg</para> 903972599cfSmrg 904972599cfSmrg<para> 905972599cfSmrgTheft: resource ID guessing (window). 906972599cfSmrg</para> 907972599cfSmrg 908972599cfSmrg<para> 909972599cfSmrgDefense for both of the above: send Window error. 910972599cfSmrg</para> 911972599cfSmrg 912972599cfSmrg</sect1> 913972599cfSmrg 914972599cfSmrg<sect1 id='GetProperty'> 915972599cfSmrg<title>GetProperty</title> 916972599cfSmrg 917972599cfSmrg<para> 918972599cfSmrgTheft: get a property stored by another client. 919972599cfSmrg</para> 920972599cfSmrg 921972599cfSmrg<para> 922972599cfSmrgTheft: resource ID guessing (window). 923972599cfSmrg</para> 924972599cfSmrg 925972599cfSmrg<para> 926972599cfSmrgDefense for both of the above: send Window error. 927972599cfSmrg</para> 928972599cfSmrg 929972599cfSmrg<note> 930972599cfSmrg<para> 931972599cfSmrgISSUE: should certain root window properties be readable? Proposed answer: yes, 932972599cfSmrgsome configurable list. Do those properties need to be polyinstantiated? 933972599cfSmrg</para> 934972599cfSmrg</note> 935972599cfSmrg 936972599cfSmrg<note> 937972599cfSmrg<para> 938972599cfSmrgISSUE: Motif drag and drop needs to be able to read the following properties: 939972599cfSmrgWM_STATE to identify top-level windows, _MOTIF_DRAG_WINDOW on 940972599cfSmrgthe root window, _MOTIF_DRAG_TARGETS on the window given in the 941972599cfSmrg_MOTIF_DRAG_WINDOW property, and _MOTIF_DRAG_RECEIVER_INFO on 942972599cfSmrgwindows with drop sites. Additionally, some properties are needed that do not 943972599cfSmrghave fixed names. 944972599cfSmrg</para> 945972599cfSmrg</note> 946972599cfSmrg 947972599cfSmrg</sect1> 948972599cfSmrg 949972599cfSmrg<sect1 id='RotateProperties'> 950972599cfSmrg<title>RotateProperties</title> 951972599cfSmrg 952972599cfSmrg<para> 953972599cfSmrgAlteration: rotate properties stored by another client. 954972599cfSmrg</para> 955972599cfSmrg 956972599cfSmrg<para> 957972599cfSmrgTheft: resource ID guessing (window). 958972599cfSmrg</para> 959972599cfSmrg 960972599cfSmrg<para> 961972599cfSmrgDefense for both of the above: send Window error. 962972599cfSmrg</para> 963972599cfSmrg</sect1> 964972599cfSmrg 965972599cfSmrg<sect1 id='ListProperties'> 966972599cfSmrg<title>ListProperties</title> 967972599cfSmrg 968972599cfSmrg<para> 969972599cfSmrgTheft: list properties stored by another client. 970972599cfSmrg</para> 971972599cfSmrg 972972599cfSmrg<para> 973972599cfSmrgTheft: resource ID guessing (window). 974972599cfSmrg</para> 975972599cfSmrg 976972599cfSmrg<para> 977972599cfSmrgDefense for both of the above: send Window error. 978972599cfSmrg</para> 979972599cfSmrg 980972599cfSmrg<note> 981972599cfSmrg<para> 982972599cfSmrgISSUE: should certain root window properties be listable? 983972599cfSmrg</para> 984972599cfSmrg</note> 985972599cfSmrg</sect1> 986972599cfSmrg 987972599cfSmrg<sect1 id='SetSelectionOwner'> 988972599cfSmrg<title>SetSelectionOwner</title> 989972599cfSmrg 990972599cfSmrg<para> 991972599cfSmrgTheft: Steal ownership of a selection. 992972599cfSmrg</para> 993972599cfSmrg 994972599cfSmrg<para> 995972599cfSmrgDenial of service: do this repeatedly so that no other client can own the 996972599cfSmrgselection. 997972599cfSmrg</para> 998972599cfSmrg 999972599cfSmrg<para> 1000972599cfSmrgDefense for both of the above: have a configurable list of selections that 1001972599cfSmrguntrusted clients can own. For other selections, treat this request as a no-op. 1002972599cfSmrg</para> 1003972599cfSmrg 1004972599cfSmrg<note> 1005972599cfSmrg<para> 1006972599cfSmrgISSUE: how does the security manager get involved here? Is it the one that 1007972599cfSmrghas the configurable list of selections instead of the server? 1008972599cfSmrg</para> 1009972599cfSmrg</note> 1010972599cfSmrg 1011972599cfSmrg<para> 1012972599cfSmrgTheft: resource ID guessing (window). 1013972599cfSmrg</para> 1014972599cfSmrg 1015972599cfSmrg<para> 1016972599cfSmrgDefense: send Window error. 1017972599cfSmrg</para> 1018972599cfSmrg</sect1> 1019972599cfSmrg 1020972599cfSmrg<sect1 id='GetSelectionOwner'> 1021972599cfSmrg<title>GetSelectionOwner</title> 1022972599cfSmrg 1023972599cfSmrg<para> 1024972599cfSmrgTheft: discover the ID of another client's window via the owner field of the 1025972599cfSmrgreply. 1026972599cfSmrg</para> 1027972599cfSmrg 1028972599cfSmrg<para> 1029972599cfSmrgDefense: if the selection is on the configurable list mentioned above, 1030972599cfSmrgreturn the root window ID, else return None. 1031972599cfSmrg</para> 1032972599cfSmrg 1033972599cfSmrg<note> 1034972599cfSmrg<para> 1035972599cfSmrgISSUE: how does the security manager get involved here? 1036972599cfSmrg</para> 1037972599cfSmrg</note> 1038972599cfSmrg</sect1> 1039972599cfSmrg 1040972599cfSmrg<sect1 id='ConvertSelection'> 1041972599cfSmrg<title>ConvertSelection</title> 1042972599cfSmrg 1043972599cfSmrg<para> 1044972599cfSmrgTheft: this initiates a selection transfer (see the ICCCM) which sends 1045972599cfSmrgthe selection contents from the selection owner, which may be another 1046972599cfSmrgclient, to the requesting client. 1047972599cfSmrg</para> 1048972599cfSmrg 1049972599cfSmrg<para> 1050972599cfSmrgDefense: since in many cases ConvertSelection is done in direct response 1051972599cfSmrgto user interaction, it is probably best not to force it to fail, either 1052972599cfSmrgsilently or with an error. The server should rely on the security manager 1053972599cfSmrgto assist in handling the selection transfer. 1054972599cfSmrg</para> 1055972599cfSmrg 1056972599cfSmrg<para> 1057972599cfSmrgTheft: resource ID guessing (requestor). 1058972599cfSmrg</para> 1059972599cfSmrg 1060972599cfSmrg<para> 1061972599cfSmrgDefense: send Window error. 1062972599cfSmrg</para> 1063972599cfSmrg</sect1> 1064972599cfSmrg 1065972599cfSmrg 1066972599cfSmrg<sect1 id='SendEvent'> 1067972599cfSmrg<title>SendEvent</title> 1068972599cfSmrg 1069972599cfSmrg<para> 1070972599cfSmrgA client can use SendEvent to cause events of any type to be sent to windows 1071972599cfSmrgof other clients. Similarly, a client could SendEvent to one of its own 10729dd7914aSmrgwindows with propagate set to True and arrange for the event to be propagated 1073972599cfSmrgup to a window it does not own. Clients can detect events generated by 1074972599cfSmrgSendEvent, but we cannot assume that they will. 1075972599cfSmrg</para> 1076972599cfSmrg 1077972599cfSmrg<para> 1078972599cfSmrgDefense: ignore this request unless the event being sent is a ClientMessage 1079972599cfSmrgevent, which should be sent normally so that selection transfer, Motif drag 1080972599cfSmrgand drop, and certain input methods have a chance at working. 1081972599cfSmrg</para> 1082972599cfSmrg 1083972599cfSmrg<note> 1084972599cfSmrg<para> 1085972599cfSmrgISSUE: does allowing all ClientMessages open up too big a hole? 1086972599cfSmrg</para> 1087972599cfSmrg</note> 1088972599cfSmrg 1089972599cfSmrg<para> 1090972599cfSmrgTheft: resource ID guessing (window). 1091972599cfSmrg</para> 1092972599cfSmrg 1093972599cfSmrg<para> 1094972599cfSmrgDefense: send Window error. 1095972599cfSmrg</para> 1096972599cfSmrg 1097972599cfSmrg</sect1> 1098972599cfSmrg 1099972599cfSmrg 1100972599cfSmrg<sect1 id='Keyboard_and_Pointer_Grabs'> 1101972599cfSmrg<title>Keyboard and Pointer Grabs</title> 1102972599cfSmrg 1103972599cfSmrg<para> 1104972599cfSmrgSpecifically, GrabKeyboard, GrabPointer, GrabKey, and GrabButton. 1105972599cfSmrg</para> 1106972599cfSmrg 1107972599cfSmrg<para> 1108972599cfSmrgDenial of service/Theft: take over the keyboard and pointer. This could 1109972599cfSmrgbe viewed as denial of service since it prevents other clients from getting 1110972599cfSmrgkeyboard or mouse input, or it could be viewed as theft since the user 1111972599cfSmrginput may not have been intended for the grabbing client. 1112972599cfSmrg</para> 1113972599cfSmrg 1114972599cfSmrg<para> 1115972599cfSmrgDefense: provide a way to break grabs via some keystroke combination, and 1116972599cfSmrghave a status area that shows which client is getting input. (See 1117972599cfSmrg<xref linkend='MapWindow' xrefstyle='select: title'/> 1118972599cfSmrg). 1119972599cfSmrg</para> 1120972599cfSmrg 1121972599cfSmrg<para> 1122972599cfSmrgTheft: resource ID guessing (grab-window, confine-to, cursor). 1123972599cfSmrg</para> 1124972599cfSmrg 1125972599cfSmrg<para> 1126972599cfSmrgDefense: send Window or Cursor error. 1127972599cfSmrg</para> 1128972599cfSmrg 1129972599cfSmrg</sect1> 1130972599cfSmrg 1131972599cfSmrg 1132972599cfSmrg 1133972599cfSmrg<sect1 id='ChangeActivePointerGrab'> 1134972599cfSmrg<title>ChangeActivePointerGrab</title> 1135972599cfSmrg 1136972599cfSmrg<para> 1137972599cfSmrgTheft: resource ID guessing (cursor). 1138972599cfSmrg</para> 1139972599cfSmrg 1140972599cfSmrg<para> 1141972599cfSmrgDefense: send Cursor error. 1142972599cfSmrg</para> 1143972599cfSmrg</sect1> 1144972599cfSmrg 1145972599cfSmrg 1146972599cfSmrg<sect1 id='GrabServer'> 1147972599cfSmrg<title>GrabServer</title> 1148972599cfSmrg 1149972599cfSmrg<para> 1150972599cfSmrgDenial of service: a client can grab the server and not let go, locking 1151972599cfSmrgout all other clients. 1152972599cfSmrg</para> 1153972599cfSmrg 1154972599cfSmrg<para> 1155972599cfSmrgDefense: provide a way to break grabs via some keystroke combination. 1156972599cfSmrg</para> 1157972599cfSmrg</sect1> 1158972599cfSmrg 1159972599cfSmrg 1160972599cfSmrg<sect1 id='QueryPointer'> 1161972599cfSmrg<title>QueryPointer</title> 1162972599cfSmrg 1163972599cfSmrg<para> 1164972599cfSmrgTheft: A client can steal pointer motion and position, button input, 1165972599cfSmrgmodifier key state, and possibly a window of another client with this request. 1166972599cfSmrg</para> 1167972599cfSmrg 1168972599cfSmrg<para> 1169972599cfSmrgDefense: if the querying client doesn't have the pointer grabbed, and 1170972599cfSmrgthe pointer is not in one of its windows, the information can be zeroed. 1171972599cfSmrg</para> 1172972599cfSmrg 1173972599cfSmrg<para> 1174972599cfSmrgTheft: resource ID guessing (window). 1175972599cfSmrg</para> 1176972599cfSmrg 1177972599cfSmrg<para> 1178972599cfSmrgDefense: send Window error. 1179972599cfSmrg</para> 1180972599cfSmrg</sect1> 1181972599cfSmrg 1182972599cfSmrg<sect1 id='GetMotionEvents'> 1183972599cfSmrg<title>GetMotionEvents</title> 1184972599cfSmrg 1185972599cfSmrg<para> 1186972599cfSmrgTheft: steal pointer motion input that went to other clients. 1187972599cfSmrg</para> 1188972599cfSmrg 1189972599cfSmrg<para> 1190972599cfSmrgDefense: ideally, the server would return only pointer input that was not 1191972599cfSmrgdelivered to any trusted client. The implementation effort to do that 1192972599cfSmrgprobably outweighs the marginal benefits. Instead, we will always return 1193972599cfSmrgan empty list of motion events to untrusted clients. 1194972599cfSmrg</para> 1195972599cfSmrg 1196972599cfSmrg<para> 1197972599cfSmrgTheft: resource ID guessing (window). 1198972599cfSmrg</para> 1199972599cfSmrg 1200972599cfSmrg<para> 1201972599cfSmrgDefense: send Window error. 1202972599cfSmrg</para> 1203972599cfSmrg</sect1> 1204972599cfSmrg 1205972599cfSmrg<sect1 id='TranslateCoordinates'> 1206972599cfSmrg<title>TranslateCoordinates</title> 1207972599cfSmrg 1208972599cfSmrg<para> 1209972599cfSmrgTheft: discover information about other clients' windows: position, 1210972599cfSmrgscreen, and possibly the ID of one of their subwindows. 1211972599cfSmrg</para> 1212972599cfSmrg 1213972599cfSmrg<para> 1214972599cfSmrgDefense: send an error if src-window or dst-window do not belong to 1215972599cfSmrgthe requesting client. 1216972599cfSmrg</para> 1217972599cfSmrg 1218972599cfSmrg<para> 1219972599cfSmrgTheft: resource ID guessing (src-window, dst-window). 1220972599cfSmrg</para> 1221972599cfSmrg 1222972599cfSmrg<para> 1223972599cfSmrgDefense: send Window error. 1224972599cfSmrg</para> 1225972599cfSmrg</sect1> 1226972599cfSmrg 1227972599cfSmrg<sect1 id='WarpPointer'> 1228972599cfSmrg<title>WarpPointer</title> 1229972599cfSmrg 1230972599cfSmrg<para> 1231972599cfSmrgA client can cause pointer motion to occur in another client's window. 1232972599cfSmrg</para> 1233972599cfSmrg 1234972599cfSmrg<para> 1235972599cfSmrgDenial of service: repeated pointer warping prevents the user from using 1236972599cfSmrgthe mouse normally. 1237972599cfSmrg</para> 1238972599cfSmrg 1239972599cfSmrg<para> 1240972599cfSmrgDefense for both of the above: if the querying client doesn't have the pointer 1241972599cfSmrggrabbed, and the pointer is not in one of its windows, treat the request as a 1242972599cfSmrgno-op. 1243972599cfSmrg</para> 1244972599cfSmrg 1245972599cfSmrg<para> 1246972599cfSmrgTheft: resource ID guessing (src-window, dst-window). 1247972599cfSmrg</para> 1248972599cfSmrg 1249972599cfSmrg<para> 1250972599cfSmrgDefense: send Window error. 1251972599cfSmrg</para> 1252972599cfSmrg</sect1> 1253972599cfSmrg 1254972599cfSmrg<sect1 id='SetInputFocus'> 1255972599cfSmrg<title>SetInputFocus</title> 1256972599cfSmrg 1257972599cfSmrg<para> 1258972599cfSmrgTheft: a client can use this request to make one of its own windows have 1259972599cfSmrgthe input focus (keyboard focus). The user may be unaware that keystrokes 1260972599cfSmrgare now going to a different window. 1261972599cfSmrg</para> 1262972599cfSmrg 1263972599cfSmrg<para> 1264972599cfSmrgDenial of service: repeatedly setting input focus prevents normal use of the 1265972599cfSmrgkeyboard. 1266972599cfSmrg</para> 1267972599cfSmrg 1268972599cfSmrg<para> 1269972599cfSmrgDefense for both of the above: only allow untrusted clients to 1270972599cfSmrgSetInputFocus if input focus is currently held by another untrusted client. 1271972599cfSmrg</para> 1272972599cfSmrg 1273972599cfSmrg<note> 1274972599cfSmrg<para> 1275972599cfSmrgISSUE: this will break clients using the Globally Active Input model 1276972599cfSmrgdescribed in section 4.1.7 of the ICCCM. 1277972599cfSmrg</para> 1278972599cfSmrg</note> 1279972599cfSmrg 1280972599cfSmrg<para> 1281972599cfSmrgTheft: resource ID guessing (focus). 1282972599cfSmrg</para> 1283972599cfSmrg 1284972599cfSmrg<para> 1285972599cfSmrgDefense: send Window error. 1286972599cfSmrg</para> 1287972599cfSmrg</sect1> 1288972599cfSmrg 1289972599cfSmrg 1290972599cfSmrg<sect1 id='GetInputFocus'> 1291972599cfSmrg<title>GetInputFocus</title> 1292972599cfSmrg 1293972599cfSmrg<para> 1294972599cfSmrgTheft: the reply may contain the ID of another client's window. 1295972599cfSmrg</para> 1296972599cfSmrg<para> 1297972599cfSmrgDefense: return a focus window of None if a trusted client currently has 1298972599cfSmrgthe input focus. 1299972599cfSmrg</para> 1300972599cfSmrg</sect1> 1301972599cfSmrg 1302972599cfSmrg 1303972599cfSmrg<sect1 id='QueryKeymap'> 1304972599cfSmrg<title>QueryKeymap</title> 1305972599cfSmrg 1306972599cfSmrg<para> 1307972599cfSmrgTheft: poll the keyboard with this to see which keys are being pressed. 1308972599cfSmrg</para> 1309972599cfSmrg 1310972599cfSmrg<para> 1311972599cfSmrgDefense: zero the returned bit vector if a trusted client currently has 1312972599cfSmrgthe input focus. 1313972599cfSmrg</para> 1314972599cfSmrg</sect1> 1315972599cfSmrg 1316972599cfSmrg<sect1 id='Font_Requests'> 1317972599cfSmrg<title>Font Requests</title> 1318972599cfSmrg 1319972599cfSmrg<para> 1320972599cfSmrgSpecifically, OpenFont, QueryFont, ListFonts, ListFontsWithInfo, and 1321972599cfSmrgQueryTextExtents. 1322972599cfSmrg</para> 1323972599cfSmrg 1324972599cfSmrg<para> 1325972599cfSmrgTheft: discover font name, glyph, and metric information about fonts that were 1326972599cfSmrgprovided by another client (by setting the font path). Whether it is theft 1327972599cfSmrgto retrieve information about fonts from the server's initial font path 1328972599cfSmrgdepends on whether or not you believe those fonts, by their existence in the 1329972599cfSmrginitial font path, are intended to be globally accessible by all clients. 1330972599cfSmrg</para> 1331972599cfSmrg 1332972599cfSmrg<para> 1333972599cfSmrgDefense: 1334972599cfSmrg</para> 1335972599cfSmrg 1336972599cfSmrg<para> 1337972599cfSmrgMaintain two separate font paths, one for trusted clients and one for untrusted 1338972599cfSmrgclients. They are both initialized to the default font path at server reset. 1339972599cfSmrgSubsequently, changes to one do not affect the other. Since untrusted clients 1340972599cfSmrgwill not see font path elements added by trusted clients, they will not be 1341972599cfSmrgable to access any fonts provided by those font path elements. 1342972599cfSmrg</para> 1343972599cfSmrg 1344972599cfSmrg<para> 1345972599cfSmrgTheft: resource ID guessing (font) (QueryFont and QueryTextExtents only). 1346972599cfSmrg</para> 1347972599cfSmrg 1348972599cfSmrg<para> 1349972599cfSmrgDefense: send Font error. 1350972599cfSmrg</para> 1351972599cfSmrg 1352972599cfSmrg<para> 1353972599cfSmrgDenial of service: open fonts until the server runs out of memory (OpenFont 1354972599cfSmrgonly). 1355972599cfSmrg</para> 1356972599cfSmrg 1357972599cfSmrg<para> 1358972599cfSmrgDefense: quotas. 1359972599cfSmrg</para> 1360972599cfSmrg 1361972599cfSmrg</sect1> 1362972599cfSmrg 1363972599cfSmrg 1364972599cfSmrg<sect1 id='CloseFont'> 1365972599cfSmrg<title>CloseFont</title> 1366972599cfSmrg 1367972599cfSmrg<para> 1368972599cfSmrgDestruction: close another client's font. 1369972599cfSmrg</para> 1370972599cfSmrg<para> 1371972599cfSmrgDefense: send Font error. 1372972599cfSmrg</para> 1373972599cfSmrg</sect1> 1374972599cfSmrg 1375972599cfSmrg<sect1 id='SetFontPath'> 1376972599cfSmrg<title>SetFontPath</title> 1377972599cfSmrg 1378972599cfSmrg<para> 1379972599cfSmrgDenial of service: change the font path so that other clients cannot 1380972599cfSmrgfind their fonts. 1381972599cfSmrg</para> 1382972599cfSmrg 1383972599cfSmrg<para> 1384972599cfSmrgAlteration: change the font path so that other clients get different 1385972599cfSmrgfonts than they expected. 1386972599cfSmrg</para> 1387972599cfSmrg<para> 1388972599cfSmrgDefense for both of the above: separate font paths for trusted and 1389972599cfSmrguntrusted clients, as described in the Font Requests section. 1390972599cfSmrg</para> 1391972599cfSmrg<note> 1392972599cfSmrg<para> 1393972599cfSmrgISSUE: the printing project considered per-client font paths and concluded 1394972599cfSmrgthat it was very difficult to do. We should look at this aspect of the print 1395972599cfSmrgserver design to see if we can reuse the same scheme. We should also try to 1396972599cfSmrgreconstruct what was so difficult about this; it doesn't seem that hard on the 1397972599cfSmrgsurface. 1398972599cfSmrg</para> 1399972599cfSmrg</note> 1400972599cfSmrg</sect1> 1401972599cfSmrg 1402972599cfSmrg<sect1 id='GetFontPath'> 1403972599cfSmrg<title>GetFontPath</title> 1404972599cfSmrg 1405972599cfSmrg<para> 1406972599cfSmrgTheft: retrieve font path elements that were set by other clients. 1407972599cfSmrg</para> 1408972599cfSmrg<para> 1409972599cfSmrgUse knowledge from font path elements to mount other attacks, e.g., 1410972599cfSmrgattack a font server found in the font path. 1411972599cfSmrg</para> 1412972599cfSmrg<para> 1413972599cfSmrgDefense for both of the above: separate font paths for trusted and 1414972599cfSmrguntrusted clients, as described in the Font Requests section. 1415972599cfSmrg</para> 1416972599cfSmrg</sect1> 1417972599cfSmrg 1418972599cfSmrg 1419972599cfSmrg<sect1 id='CreatePixmap'> 1420972599cfSmrg<title>CreatePixmap</title> 1421972599cfSmrg 1422972599cfSmrg<para> 1423972599cfSmrgTheft: resource ID guessing (drawable). 1424972599cfSmrg</para> 1425972599cfSmrg<para> 1426972599cfSmrgDefense: send Drawable error. 1427972599cfSmrg</para> 1428972599cfSmrg<para> 1429972599cfSmrgDenial of service: create pixmaps until the server runs out of memory. 1430972599cfSmrg</para> 1431972599cfSmrg<para> 1432972599cfSmrgDefense: quotas. 1433972599cfSmrg</para> 1434972599cfSmrg</sect1> 1435972599cfSmrg 1436972599cfSmrg<sect1 id='FreePixmap'> 1437972599cfSmrg<title>FreePixmap</title> 1438972599cfSmrg 1439972599cfSmrg<para> 1440972599cfSmrgDestruction: destroy another client's pixmap. 1441972599cfSmrg</para> 1442972599cfSmrg<para> 1443972599cfSmrgDefense: send Pixmap error. 1444972599cfSmrg</para> 1445972599cfSmrg</sect1> 1446972599cfSmrg 1447972599cfSmrg<sect1 id='CreateGC'> 1448972599cfSmrg<title>CreateGC</title> 1449972599cfSmrg 1450972599cfSmrg<para> 1451972599cfSmrgTheft: resource ID guessing (drawable, tile, stipple, font, clip-mask). 1452972599cfSmrg</para> 1453972599cfSmrg<para> 1454972599cfSmrgDefense: send Drawable, Pixmap, or Font error. 1455972599cfSmrg</para> 1456972599cfSmrg<para> 1457972599cfSmrgDenial of service: create GCs until the server runs out of memory. 1458972599cfSmrg</para> 1459972599cfSmrg<para> 1460972599cfSmrgDefense: quotas. 1461972599cfSmrg</para> 1462972599cfSmrg</sect1> 1463972599cfSmrg 1464972599cfSmrg 1465972599cfSmrg<sect1 id='CopyGC'> 1466972599cfSmrg<title>CopyGC</title> 1467972599cfSmrg 1468972599cfSmrg<para> 1469972599cfSmrgTheft: copy GC values of another client's GC. 1470972599cfSmrg</para> 1471972599cfSmrg<para> 1472972599cfSmrgAlteration: copy GC values to another client's GC. 1473972599cfSmrg</para> 1474972599cfSmrg<para> 1475972599cfSmrgDefense for both of the above: send GC error. 1476972599cfSmrg</para> 1477972599cfSmrg</sect1> 1478972599cfSmrg 1479972599cfSmrg 1480972599cfSmrg<sect1 id='ChangeGC_SetDashes_SetClipRectangles'> 1481972599cfSmrg<title>ChangeGC, SetDashes, SetClipRectangles</title> 1482972599cfSmrg 1483972599cfSmrg<para> 1484972599cfSmrgAlteration: change values of another client's GC. 1485972599cfSmrg</para> 1486972599cfSmrg<para> 1487972599cfSmrgTheft: resource ID guessing (gc, tile, stipple, font, clip-mask) 1488972599cfSmrg(last four for ChangeGC only). 1489972599cfSmrg</para> 1490972599cfSmrg<para> 1491972599cfSmrgDefense for both of the above: send GC error. 1492972599cfSmrg</para> 1493972599cfSmrg</sect1> 1494972599cfSmrg 1495972599cfSmrg<sect1 id='FreeGC'> 1496972599cfSmrg<title>FreeGC</title> 1497972599cfSmrg 1498972599cfSmrg<para> 1499972599cfSmrgDestruction: destroy another client's GC. 1500972599cfSmrg</para> 1501972599cfSmrg<para> 1502972599cfSmrgDefense: send GC error. 1503972599cfSmrg 1504972599cfSmrg</para> 1505972599cfSmrg</sect1> 1506972599cfSmrg 1507972599cfSmrg 1508972599cfSmrg<sect1 id='Drawing_Requests'> 1509972599cfSmrg<title>Drawing Requests</title> 1510972599cfSmrg 1511972599cfSmrg<para> 1512972599cfSmrgSpecifically, ClearArea, CopyArea, CopyPlane, PolyPoint, PolyLine, PolySegment, 1513972599cfSmrgPolyRectangle, PolyArc, FillPoly, PolyFillRectangle, PolyFillArc, PutImage, 1514972599cfSmrgPolyText8, PolyText16, ImageText8, and ImageText16. 1515972599cfSmrg</para> 1516972599cfSmrg<para> 1517972599cfSmrgAlteration: draw to another client's drawable. 1518972599cfSmrg</para> 1519972599cfSmrg<para> 1520972599cfSmrgTheft: resource ID guessing: ClearArea - window; CopyArea, CopyPlane - 1521972599cfSmrgsrc-drawable, dst-drawable, gc; all others - drawable, gc. 1522972599cfSmrg</para> 1523972599cfSmrg<para> 1524972599cfSmrgDefense for both of the above: send appropriate error. 1525972599cfSmrg</para> 1526972599cfSmrg<note> 1527972599cfSmrg<para> 1528972599cfSmrgISSUE: The Motif preregister drag protocol requires clients to draw 1529972599cfSmrginto windows of other clients for drag-over/under effects. 1530972599cfSmrg</para> 1531972599cfSmrg</note> 1532972599cfSmrg<para> 1533972599cfSmrgSpoofing: draw to a window to make it resemble a window of another client. 1534972599cfSmrg</para> 1535972599cfSmrg<para> 1536972599cfSmrgDefense: see 1537972599cfSmrg<xref linkend='MapWindow' xrefstyle='select: title'/> 1538972599cfSmrg. 1539972599cfSmrg</para> 1540972599cfSmrg</sect1> 1541972599cfSmrg 1542972599cfSmrg 1543972599cfSmrg<sect1 id='GetImage'> 1544972599cfSmrg<title>GetImage</title> 1545972599cfSmrg 1546972599cfSmrg<para> 1547972599cfSmrgTheft: get the image of another client's drawable. 1548972599cfSmrg</para> 1549972599cfSmrg<para> 1550972599cfSmrgTheft: resource ID guessing (drawable). 1551972599cfSmrg</para> 1552972599cfSmrg<para> 1553972599cfSmrgDefense: send Drawable error. 1554972599cfSmrg</para> 1555972599cfSmrg<para> 1556972599cfSmrgTheft: get the image of your own window, which may contain pieces of other 1557972599cfSmrgoverlapping windows. 1558972599cfSmrg</para> 1559972599cfSmrg<para> 1560972599cfSmrgDefense: censor returned images by blotting out areas that contain data 1561972599cfSmrgfrom trusted windows. 1562972599cfSmrg</para> 1563972599cfSmrg</sect1> 1564972599cfSmrg 1565972599cfSmrg<sect1 id='CreateColormap'> 1566972599cfSmrg<title>CreateColormap</title> 1567972599cfSmrg 1568972599cfSmrg<para> 1569972599cfSmrgTheft: resource ID guessing (window). 1570972599cfSmrg</para> 1571972599cfSmrg<para> 1572972599cfSmrgDefense: send Colormap error. 1573972599cfSmrg 1574972599cfSmrg</para> 1575972599cfSmrg<para> 1576972599cfSmrgDenial of service: create colormaps with this request until the server 1577972599cfSmrgruns out of memory. 1578972599cfSmrg</para> 1579972599cfSmrg<para> 1580972599cfSmrgDefense: quotas. 1581972599cfSmrg</para> 1582972599cfSmrg</sect1> 1583972599cfSmrg 1584972599cfSmrg<sect1 id='FreeColormap'> 1585972599cfSmrg<title>FreeColormap</title> 1586972599cfSmrg 1587972599cfSmrg<para> 1588972599cfSmrgDestruction: destroy another client's colormap. 1589972599cfSmrg</para> 1590972599cfSmrg<para> 1591972599cfSmrgDefense: send Colormap error. 1592972599cfSmrg</para> 1593972599cfSmrg</sect1> 1594972599cfSmrg 1595972599cfSmrg 1596972599cfSmrg<sect1 id='CopyColormapAndFree'> 1597972599cfSmrg<title>CopyColormapAndFree</title> 1598972599cfSmrg 1599972599cfSmrg<para> 1600972599cfSmrgTheft: resource ID guessing (src-map). 1601972599cfSmrg</para> 1602972599cfSmrg<para> 1603972599cfSmrgDefense: send Colormap error. However, default colormaps will be allowed. 1604972599cfSmrg</para> 1605972599cfSmrg<note> 1606972599cfSmrg<para> 1607972599cfSmrgISSUE: must untrusted applications be allowed to use standard colormaps? 1608972599cfSmrg(Same issue for ListInstalledColormaps, Color Allocation Requests, 1609972599cfSmrgFreeColors, StoreColors, StoreNamedColor, QueryColors, and LookupColor.) 1610972599cfSmrg</para> 1611972599cfSmrg</note> 1612972599cfSmrg<para> 1613972599cfSmrgDenial of service: create colormaps with this request until the server 1614972599cfSmrgruns out of memory. 1615972599cfSmrg</para> 1616972599cfSmrg<para> 1617972599cfSmrgDefense: quotas. 1618972599cfSmrg</para> 1619972599cfSmrg</sect1> 1620972599cfSmrg 1621972599cfSmrg<sect1 id='InstallColormap_UninstallColormap'> 1622972599cfSmrg<title>InstallColormap, UninstallColormap</title> 1623972599cfSmrg 1624972599cfSmrg<para> 1625972599cfSmrgTheft: resource ID guessing. 1626972599cfSmrg</para> 1627972599cfSmrg<para> 1628972599cfSmrgDefense: send Colormap error. 1629972599cfSmrg</para> 1630972599cfSmrg<para> 1631972599cfSmrgDenial of service: (un)install any colormap, potentially preventing 1632972599cfSmrgwindows from displaying correct colors. 1633972599cfSmrg</para> 1634972599cfSmrg<para> 1635972599cfSmrgDefense: treat this request as a no-op. Section 4.1.8 of the ICCCM states 1636972599cfSmrgthat (un)installing colormaps is the responsibility of the window manager 1637972599cfSmrgalone. 1638972599cfSmrg</para> 1639972599cfSmrg 1640972599cfSmrg<note> 1641972599cfSmrg<para> 1642972599cfSmrgISSUE: the ICCCM also allows clients to do colormap installs if the client 1643972599cfSmrghas the pointer grabbed. Do we need to allow that too? 1644972599cfSmrg</para> 1645972599cfSmrg</note> 1646972599cfSmrg</sect1> 1647972599cfSmrg 1648972599cfSmrg<sect1 id='ListInstalledColormaps'> 1649972599cfSmrg<title>ListInstalledColormaps</title> 1650972599cfSmrg 1651972599cfSmrg<para> 1652972599cfSmrgTheft: resource ID guessing (window). 1653972599cfSmrg</para> 1654972599cfSmrg 1655972599cfSmrg<para> 1656972599cfSmrgDefense: send Colormap error. 1657972599cfSmrg</para> 1658972599cfSmrg<para> 1659972599cfSmrgTheft: discover the resource ID of another client's colormap from the reply. 1660972599cfSmrg</para> 1661972599cfSmrg<para> 1662972599cfSmrgDefense: remove the returned colormap IDs; only let through default 1663972599cfSmrgcolormaps and colormaps of untrusted clients. 1664972599cfSmrg</para> 1665972599cfSmrg</sect1> 1666972599cfSmrg 1667972599cfSmrg<sect1 id='Color_Allocation_Requests'> 1668972599cfSmrg<title>Color Allocation Requests</title> 1669972599cfSmrg 1670972599cfSmrg<para> 1671972599cfSmrgSpecifically, AllocColor, AllocNamedColor, AllocColorCells, and 1672972599cfSmrgAllocColorPlanes. 1673972599cfSmrg</para> 1674972599cfSmrg<para> 1675972599cfSmrgAlteration/Denial of service: allocate colors in another client's 1676972599cfSmrgcolormap. It is denial of service if the owning client's color allocations 1677972599cfSmrgfail because there are no cells available. Otherwise it is just alteration. 1678972599cfSmrg</para> 1679972599cfSmrg<para> 1680972599cfSmrgTheft: resource ID guessing (cmap). 1681972599cfSmrg</para> 1682972599cfSmrg<para> 1683972599cfSmrgDefense for both of the above: send Colormap error. However, default 1684972599cfSmrgcolormaps will be allowed. 1685972599cfSmrg</para> 1686972599cfSmrg</sect1> 1687972599cfSmrg 1688972599cfSmrg<sect1 id='FreeColors'> 1689972599cfSmrg<title>FreeColors</title> 1690972599cfSmrg 1691972599cfSmrg<para> 1692972599cfSmrgTheft: resource ID guessing (cmap). 1693972599cfSmrg</para> 1694972599cfSmrg<para> 1695972599cfSmrgDefense: send Colormap error. However, default colormaps will be allowed. 1696972599cfSmrg</para> 1697972599cfSmrg</sect1> 1698972599cfSmrg 1699972599cfSmrg<sect1 id='StoreColors_StoreNamedColor'> 1700972599cfSmrg<title>StoreColors, StoreNamedColor</title> 1701972599cfSmrg 1702972599cfSmrg<para> 1703972599cfSmrgAlteration: change the colors in another client's colormap. 1704972599cfSmrg</para> 1705972599cfSmrg<para> 1706972599cfSmrgTheft: resource ID guessing (cmap). 1707972599cfSmrg</para> 1708972599cfSmrg<para> 1709972599cfSmrgDefense for both of the above: send Colormap error. However, default 1710972599cfSmrgcolormaps will be allowed. 1711972599cfSmrg</para> 1712972599cfSmrg</sect1> 1713972599cfSmrg 1714972599cfSmrg 1715972599cfSmrg<sect1 id='QueryColors_LookupColor'> 1716972599cfSmrg<title>QueryColors, LookupColor</title> 1717972599cfSmrg 1718972599cfSmrg<para> 1719972599cfSmrgTheft: retrieve information about the colors in another client's colormap. 1720972599cfSmrg</para> 1721972599cfSmrg<para> 1722972599cfSmrgTheft: resource ID guessing (cmap). 1723972599cfSmrg</para> 1724972599cfSmrg<para> 1725972599cfSmrgDefense for both of the above: send Colormap error. However, default 1726972599cfSmrgcolormaps will be allowed. 1727972599cfSmrg</para> 1728972599cfSmrg</sect1> 1729972599cfSmrg 1730972599cfSmrg<sect1 id='CreateCursor_CreateGlyphCursor'> 1731972599cfSmrg<title>CreateCursor, CreateGlyphCursor</title> 1732972599cfSmrg 1733972599cfSmrg<para> 1734972599cfSmrgTheft: resource ID guessing (source, mask or source-font, mask-font). 1735972599cfSmrg</para> 1736972599cfSmrg<para> 1737972599cfSmrgDefense: send Pixmap or Font error. However, the default font will be allowed. 1738972599cfSmrg</para> 1739972599cfSmrg<para> 1740972599cfSmrgDenial of service: create cursors until the server runs out of memory. 1741972599cfSmrg</para> 1742972599cfSmrg<para> 1743972599cfSmrgDefense: quotas. 1744972599cfSmrg</para> 1745972599cfSmrg</sect1> 1746972599cfSmrg 1747972599cfSmrg<sect1 id='FreeCursor'> 1748972599cfSmrg<title>FreeCursor</title> 1749972599cfSmrg 1750972599cfSmrg<para> 1751972599cfSmrgDestruction: free another client's cursor. 1752972599cfSmrg</para> 1753972599cfSmrg<para> 1754972599cfSmrgDefense: send Cursor error. 1755972599cfSmrg</para> 1756972599cfSmrg</sect1> 1757972599cfSmrg 1758972599cfSmrg<sect1 id='RecolorCursor'> 1759972599cfSmrg<title>RecolorCursor</title> 1760972599cfSmrg 1761972599cfSmrg<para> 1762972599cfSmrgAlteration: recolor another client's cursor. 1763972599cfSmrg</para> 1764972599cfSmrg<para> 1765972599cfSmrgTheft: resource ID guessing (cursor). 1766972599cfSmrg</para> 1767972599cfSmrg<para> 1768972599cfSmrgDefense for both of the above: send Cursor error. 1769972599cfSmrg</para> 1770972599cfSmrg</sect1> 1771972599cfSmrg 1772972599cfSmrg<sect1 id='QueryBestSize'> 1773972599cfSmrg<title>QueryBestSize</title> 1774972599cfSmrg 1775972599cfSmrg<para> 1776972599cfSmrgTheft: resource ID guessing (drawable). 1777972599cfSmrg</para> 1778972599cfSmrg<para> 1779972599cfSmrgDefense: send Drawable error. 1780972599cfSmrg</para> 1781972599cfSmrg</sect1> 1782972599cfSmrg 1783972599cfSmrg<sect1 id='ListExtensions_QueryExtension'> 1784972599cfSmrg<title>ListExtensions, QueryExtension</title> 1785972599cfSmrg 1786972599cfSmrg<para> 1787972599cfSmrgDetermine the extensions supported by the server, and use the list to choose 1788972599cfSmrgextension-specific attacks to attempt. 1789972599cfSmrg</para> 1790972599cfSmrg<para> 1791972599cfSmrgDefense: extensions will have a way to tell the server whether it is safe 1792972599cfSmrgfor untrusted clients to use them. These requests will only return information 1793972599cfSmrgabout extensions that claim to be safe. 1794972599cfSmrg</para> 1795972599cfSmrg</sect1> 1796972599cfSmrg 1797972599cfSmrg<sect1 id='Keyboard_configuration_requests'> 1798972599cfSmrg<title>Keyboard configuration requests</title> 1799972599cfSmrg 1800972599cfSmrg<para> 1801972599cfSmrgSpecifically, ChangeKeyboardControl, ChangeKeyboardMapping, and 1802972599cfSmrgSetModifierMapping. 1803972599cfSmrg</para> 1804972599cfSmrg<para> 1805972599cfSmrgAlteration: change the keyboard parameters that were established by another 1806972599cfSmrgclient. 1807972599cfSmrg</para> 1808972599cfSmrg<para> 1809972599cfSmrgDenial of service: with ChangeKeyboardControl, disable auto-repeat, key 1810972599cfSmrgclick, or the bell. With ChangeKeyboardMapping or SetModifierMapping, 1811972599cfSmrgchange the key mappings so that the keyboard is difficult or impossible to 1812972599cfSmrguse. 1813972599cfSmrg</para> 1814972599cfSmrg<para> 1815972599cfSmrgDefense for both of the above: treat these requests as a no-op. 1816972599cfSmrg</para> 1817972599cfSmrg</sect1> 1818972599cfSmrg 1819972599cfSmrg 1820972599cfSmrg<sect1 id='Keyboard_query_requests'> 1821972599cfSmrg<title>Keyboard query requests</title> 1822972599cfSmrg 1823972599cfSmrg<para> 1824972599cfSmrgSpecifically, GetKeyboardControl, GetKeyboardMapping, and GetModifierMapping. 1825972599cfSmrg</para> 1826972599cfSmrg<para> 1827972599cfSmrgTheft: get keyboard information that was established by another client. 1828972599cfSmrg</para> 1829972599cfSmrg<para> 1830972599cfSmrgDefense: This is a minor form of theft. We propose to do nothing about this 1831972599cfSmrgthreat. 1832972599cfSmrg</para> 1833972599cfSmrg</sect1> 1834972599cfSmrg 1835972599cfSmrg 1836972599cfSmrg<sect1 id='ChangePointerControl_SetPointerMapping'> 1837972599cfSmrg<title>ChangePointerControl, SetPointerMapping</title> 1838972599cfSmrg 1839972599cfSmrg<para> 1840972599cfSmrgAlteration: change the pointer parameters that were established by another 1841972599cfSmrgclient. 1842972599cfSmrg</para> 1843972599cfSmrg<para> 1844972599cfSmrgDenial of service: set the pointer parameters so that the pointer is 1845972599cfSmrgdifficult or impossible to use. 1846972599cfSmrg</para> 1847972599cfSmrg<para> 1848972599cfSmrgDefense for both of the above: treat these requests as a no-op. 1849972599cfSmrg</para> 1850972599cfSmrg</sect1> 1851972599cfSmrg 1852972599cfSmrg<sect1 id='GetPointerControl_GetPointerMapping'> 1853972599cfSmrg<title>GetPointerControl, GetPointerMapping</title> 1854972599cfSmrg 1855972599cfSmrg<para> 1856972599cfSmrgTheft: get pointer parameters that were established by another client. 1857972599cfSmrg</para> 1858972599cfSmrg<para> 1859972599cfSmrgDefense: This is a minor form of theft. We propose to do nothing about this 1860972599cfSmrgthreat. 1861972599cfSmrg</para> 1862972599cfSmrg</sect1> 1863972599cfSmrg 1864972599cfSmrg<sect1 id='SetScreenSaver'> 1865972599cfSmrg<title>SetScreenSaver</title> 1866972599cfSmrg 1867972599cfSmrg<para> 1868972599cfSmrgAlteration: change the screen saver parameters that were established by 1869972599cfSmrganother client. 1870972599cfSmrg</para> 1871972599cfSmrg<para> 1872972599cfSmrgDenial of service: set the screen saver parameters so that the screen saver 1873972599cfSmrgis always on or always off. 1874972599cfSmrg</para> 1875972599cfSmrg<para> 1876972599cfSmrgDefense for both of the above: treat these requests as a no-op. 1877972599cfSmrg</para> 1878972599cfSmrg</sect1> 1879972599cfSmrg 1880972599cfSmrg 1881972599cfSmrg<sect1 id='GetScreenSaver'> 1882972599cfSmrg<title>GetScreenSaver</title> 1883972599cfSmrg 1884972599cfSmrg<para> 1885972599cfSmrgTheft: get screen saver parameters that were established by another client. 1886972599cfSmrg</para> 1887972599cfSmrg<para> 1888972599cfSmrgDefense: This is a minor form of theft. We propose to do nothing about this 1889972599cfSmrgthreat. 1890972599cfSmrg</para> 1891972599cfSmrg</sect1> 1892972599cfSmrg 1893972599cfSmrg<sect1 id='ForceScreenSaver'> 1894972599cfSmrg<title>ForceScreenSaver</title> 1895972599cfSmrg 1896972599cfSmrg<para> 1897972599cfSmrgDenial of service: repeatedly activate the screen saver so that the user 1898972599cfSmrgcannot see the screen as it would look when the screen saver is off. 1899972599cfSmrg</para> 1900972599cfSmrg<para> 1901972599cfSmrgDenial of service: repeatedly reset the screen saver, preventing it from 1902972599cfSmrgactivating. 1903972599cfSmrg</para> 1904972599cfSmrg<para> 1905972599cfSmrgDefense for both of the above: treat these requests as a no-op. 1906972599cfSmrg</para> 1907972599cfSmrg</sect1> 1908972599cfSmrg 1909972599cfSmrg<sect1 id='ChangeHost'> 1910972599cfSmrg<title>ChangeHost</title> 1911972599cfSmrg 1912972599cfSmrg<para> 1913972599cfSmrgMost servers already have some restrictions on which clients can use this 1914972599cfSmrgrequest, so whether the following list applies is implementation dependent. 1915972599cfSmrg</para> 1916972599cfSmrg<para> 1917972599cfSmrgDenial of service: remove a host from the list, preventing clients from 1918972599cfSmrgconnecting from that host. 1919972599cfSmrg</para> 1920972599cfSmrg<para> 1921972599cfSmrgAdd a host to the list. Clients from that host may then launch other 1922972599cfSmrgattacks of any type. 1923972599cfSmrg</para> 1924972599cfSmrg<para> 1925972599cfSmrgDefense for both of the above: return Access error. 1926972599cfSmrg</para> 1927972599cfSmrg</sect1> 1928972599cfSmrg 1929972599cfSmrg 1930972599cfSmrg<sect1 id='ListHosts'> 1931972599cfSmrg<title>ListHosts</title> 1932972599cfSmrg 1933972599cfSmrg<para> 1934972599cfSmrgTheft: steal host identities and possibly even user identities that are 1935972599cfSmrgallowed to connect. 1936972599cfSmrg</para> 1937972599cfSmrg<para> 1938972599cfSmrgLaunch attacks of any type against the stolen host/user identities. 1939972599cfSmrg</para> 1940972599cfSmrg<para> 1941972599cfSmrgDefense for both of the above: return only untrusted hosts. 1942972599cfSmrg</para> 1943972599cfSmrg</sect1> 1944972599cfSmrg 1945972599cfSmrg 1946972599cfSmrg<sect1 id='SetAccessControl'> 1947972599cfSmrg<title>SetAccessControl</title> 1948972599cfSmrg 1949972599cfSmrg<para> 1950972599cfSmrgMost servers already have some restrictions on which clients can use this 1951972599cfSmrgrequest, so whether the following list applies is implementation dependent. 1952972599cfSmrg</para> 1953972599cfSmrg<para> 1954972599cfSmrgAlteration: change the access control value established by some other client. 1955972599cfSmrg</para> 1956972599cfSmrg<para> 1957972599cfSmrgDisable access control, allowing clients to connect who would normally not be 1958972599cfSmrgable to connect. Those clients may then launch other attacks of any type. 1959972599cfSmrg</para> 1960972599cfSmrg<para> 1961972599cfSmrgDefense for both of the above: return Access error. 1962972599cfSmrg</para> 1963972599cfSmrg</sect1> 1964972599cfSmrg 1965972599cfSmrg<sect1 id='SetCloseDownMode'> 1966972599cfSmrg<title>SetCloseDownMode</title> 1967972599cfSmrg 1968972599cfSmrg<para> 1969972599cfSmrgDenial of service: set the close-down mode to RetainPermanent or 1970972599cfSmrgRetainTemporary, then disconnect. The server cannot reuse the 1971972599cfSmrgresource-id-base of the disconnected client, or the memory used by the 1972972599cfSmrgretained resources, unless another client issues an appropriate KillClient 1973972599cfSmrgto cancel the retainment. The server has a limited number of 1974972599cfSmrgresource-id-bases, and when they are exhausted, it will be unable to accept 1975972599cfSmrgnew client connections. 1976972599cfSmrg</para> 1977972599cfSmrg<para> 1978972599cfSmrgDefense: treat this request as a no-op. 1979972599cfSmrg</para> 1980972599cfSmrg</sect1> 1981972599cfSmrg 1982972599cfSmrg<sect1 id='KillClient'> 1983972599cfSmrg<title>KillClient</title> 1984972599cfSmrg 1985972599cfSmrg<para> 1986972599cfSmrgDestruction/Denial of service: kill another currently connected client. 1987972599cfSmrg</para> 1988972599cfSmrg<para> 1989972599cfSmrgDestruction: kill a client that has terminated with close-down mode of 1990972599cfSmrgRetainTemporary or RetainPermanent, destroying all its retained resources. 1991972599cfSmrg</para> 1992972599cfSmrg<para> 1993972599cfSmrgDestruction: specify AllTemporary as the resource, destroying all resources 1994972599cfSmrgof clients that have terminated with close-down mode RetainTemporary. 1995972599cfSmrg</para> 1996972599cfSmrg<para> 1997972599cfSmrgDefense for all of the above: return Value error. 1998972599cfSmrg</para> 1999972599cfSmrg</sect1> 2000972599cfSmrg 2001972599cfSmrg<sect1 id='Clean_Requests'> 2002972599cfSmrg<title>Clean Requests</title> 2003972599cfSmrg 2004972599cfSmrg<para> 2005972599cfSmrgOther than denial of service caused by flooding, these requests have no known 2006972599cfSmrgsecurity concerns: AllowEvents, UngrabPointer, UngrabButton, UngrabKeyboard, 2007972599cfSmrgUngrabKey, UngrabServer, NoOperation, and Bell. 2008972599cfSmrg</para> 2009972599cfSmrg</sect1> 2010972599cfSmrg</chapter> 2011972599cfSmrg 2012972599cfSmrg<chapter id='Events'> 2013972599cfSmrg<title>Events</title> 2014972599cfSmrg 2015972599cfSmrg<para> 2016972599cfSmrgThe only threat posed by events is theft. Selecting for events on another 2017972599cfSmrgclient's resources is always theft. We restrict further analysis by 2018972599cfSmrgassuming that the client only selects for events on its own resources, 2019972599cfSmrgthen asking whether the events provide information about other clients. 2020972599cfSmrg</para> 2021972599cfSmrg 2022972599cfSmrg<sect1 id='KeymapNotify'> 2023972599cfSmrg<title>KeymapNotify</title> 2024972599cfSmrg 2025972599cfSmrg<para> 2026972599cfSmrgTheft: the state of the keyboard can be seen when the client does not have 2027972599cfSmrgthe input focus. This is possible because a KeymapNotify is sent to a 2028972599cfSmrgwindow after every EnterNotify even if the window does not have input focus. 2029972599cfSmrg</para> 2030972599cfSmrg<para> 2031972599cfSmrgDefense: zero the returned bit vector if a trusted client currently has the 2032972599cfSmrginput focus. 2033972599cfSmrg</para> 2034972599cfSmrg</sect1> 2035972599cfSmrg 2036972599cfSmrg<sect1 id='Expose'> 2037972599cfSmrg<title>Expose</title> 2038972599cfSmrg 2039972599cfSmrg<para> 2040972599cfSmrgTheft: discover where other clients' windows overlap your own. For 2041972599cfSmrginstance, map a full-screen window, lower it, then raise it. The resulting 2042972599cfSmrgexposes tell you where other windows are. 2043972599cfSmrg</para> 2044972599cfSmrg 2045972599cfSmrg<para> 2046972599cfSmrgDefense: about the only thing you could do here is force backing store to be 2047972599cfSmrgused on untrusted windows, but that would probably use too much server 2048972599cfSmrgmemory. We propose to do nothing about this threat. 2049972599cfSmrg</para> 2050972599cfSmrg</sect1> 2051972599cfSmrg 2052972599cfSmrg<sect1 id='GraphicsExposure'> 2053972599cfSmrg<title>GraphicsExposure</title> 2054972599cfSmrg 2055972599cfSmrg<para> 2056972599cfSmrgTheft: discover where other clients' windows overlap your own. For instance, 2057972599cfSmrguse CopyArea to copy the entire window's area exactly on top of itself. The 2058972599cfSmrgresulting GraphicsExposures tell you where the window was obscured. 2059972599cfSmrg</para> 2060972599cfSmrg<para> 2061972599cfSmrgDefense: see Expose above. We propose to do nothing about this threat. 2062972599cfSmrg</para> 2063972599cfSmrg</sect1> 2064972599cfSmrg 2065972599cfSmrg<sect1 id='VisibilityNotify'> 2066972599cfSmrg<title>VisibilityNotify</title> 2067972599cfSmrg 2068972599cfSmrg<para> 2069972599cfSmrgTheft: this event provides crude positional information about other 2070972599cfSmrgclients, though the receiver cannot tell which other clients. 2071972599cfSmrg</para> 2072972599cfSmrg<para> 2073972599cfSmrgDefense: The information content of this event is very low. We propose to 2074972599cfSmrgdo nothing about this threat. 2075972599cfSmrg</para> 2076972599cfSmrg</sect1> 2077972599cfSmrg 2078972599cfSmrg<sect1 id='ReparentNotify'> 2079972599cfSmrg<title>ReparentNotify</title> 2080972599cfSmrg 2081972599cfSmrg<para> 2082972599cfSmrgTheft: the parent window may belong to some other client (probably the 2083972599cfSmrgwindow manager). 2084972599cfSmrg</para> 2085972599cfSmrg<para> 2086972599cfSmrgDefense: If the parent window belongs to a trusted client, return the 2087972599cfSmrgclosest ancestor window that belongs to an untrusted client, or if such a 2088972599cfSmrgwindow does not exist, return the root window for the parent window. 2089972599cfSmrg</para> 2090972599cfSmrg<note> 2091972599cfSmrg<para> 2092972599cfSmrgISSUE: what is the application impact? 2093972599cfSmrg</para> 2094972599cfSmrg</note> 2095972599cfSmrg 2096972599cfSmrg</sect1> 2097972599cfSmrg 2098972599cfSmrg 2099972599cfSmrg<sect1 id='ConfigureNotify'> 2100972599cfSmrg<title>ConfigureNotify</title> 2101972599cfSmrg 2102972599cfSmrg 2103972599cfSmrg<para> 2104972599cfSmrgTheft: the above-sibling window may belong to some other client. 2105972599cfSmrg</para> 2106972599cfSmrg<para> 2107972599cfSmrgDefense: return None for the above-sibling window if it belongs to a trusted 2108972599cfSmrgclient. 2109972599cfSmrg</para> 2110972599cfSmrg<note> 2111972599cfSmrg<para> 2112972599cfSmrgISSUE: what is the application impact? 2113972599cfSmrg</para> 2114972599cfSmrg</note> 2115972599cfSmrg 2116972599cfSmrg</sect1> 2117972599cfSmrg 2118972599cfSmrg 2119972599cfSmrg<sect1 id='ConfigureRequest'> 2120972599cfSmrg<title>ConfigureRequest</title> 2121972599cfSmrg 2122972599cfSmrg<para> 2123972599cfSmrgTheft: the sibling window may belong to some other client. 2124972599cfSmrg</para> 2125972599cfSmrg<para> 2126972599cfSmrgDefense: return None for the sibling window if it belongs to a trusted client. 2127972599cfSmrg</para> 2128972599cfSmrg<para> 2129972599cfSmrgISSUE: what is the application impact? 2130972599cfSmrg</para> 2131972599cfSmrg</sect1> 2132972599cfSmrg 2133972599cfSmrg 2134972599cfSmrg<sect1 id='SelectionClear'> 2135972599cfSmrg<title>SelectionClear</title> 2136972599cfSmrg 2137972599cfSmrg<para> 2138972599cfSmrgTheft: the owner window may belong to some other client. 2139972599cfSmrg</para> 2140972599cfSmrg<para> 2141972599cfSmrgDefense: return None for the owner window if it belongs to a trusted client. 2142972599cfSmrg</para> 2143972599cfSmrg</sect1> 2144972599cfSmrg 2145972599cfSmrg<sect1 id='SelectionRequest'> 2146972599cfSmrg<title>SelectionRequest</title> 2147972599cfSmrg 2148972599cfSmrg<para> 2149972599cfSmrgTheft: the requestor window may belong to some other client. 2150972599cfSmrg</para> 2151972599cfSmrg<para> 2152972599cfSmrgDefense: Blocking this event or censoring the window would prevent selection 2153972599cfSmrgtransfers from untrusted clients to trusted clients from working. We propose 2154972599cfSmrgto do nothing in the server about this threat. The security manager may 2155972599cfSmrgreduce the exposure of trusted window IDs by becoming the owner of all 2156972599cfSmrgselections. 2157972599cfSmrg</para> 2158972599cfSmrg</sect1> 2159972599cfSmrg 2160972599cfSmrg 2161972599cfSmrg<sect1 id='MappingNotify'> 2162972599cfSmrg<title>MappingNotify</title> 2163972599cfSmrg 2164972599cfSmrg<para> 2165972599cfSmrgTheft: discover keyboard, pointer, or modifier mapping information set 2166972599cfSmrgby another client. 2167972599cfSmrg</para> 2168972599cfSmrg<para> 2169972599cfSmrgDefense: Any tampering with this event will cause clients to have an 2170972599cfSmrginconsistent view of the keyboard or pointer button configuration, which is 2171972599cfSmrglikely to confuse the user. We propose to do nothing about this threat. 2172972599cfSmrg</para> 2173972599cfSmrg</sect1> 2174972599cfSmrg</chapter> 2175972599cfSmrg 2176972599cfSmrg<chapter id='Errors'> 2177972599cfSmrg<title>Errors</title> 2178972599cfSmrg 2179972599cfSmrg<para> 21805eeb4e8fSmrgThere appear to be no threats related to protocol errors. 2181972599cfSmrg</para> 2182972599cfSmrg 2183972599cfSmrg</chapter> 2184972599cfSmrg 2185972599cfSmrg 2186972599cfSmrg 2187972599cfSmrg 2188972599cfSmrg<chapter id='Future_Work'> 2189972599cfSmrg<title>Future Work</title> 2190972599cfSmrg 2191972599cfSmrg<para> 2192972599cfSmrgThe next steps are resolve the items marked ISSUE and to decide if the 2193972599cfSmrgdefenses proposed are reasonable. Discussion on the security@x.org mailing list, 2194972599cfSmrgprototyping, and/or starting the implementation should help answer these 2195972599cfSmrgquestions. 2196972599cfSmrg</para> 2197972599cfSmrg</chapter> 2198972599cfSmrg 2199972599cfSmrg 2200972599cfSmrg<chapter id='References'> 2201972599cfSmrg<title>References</title> 2202972599cfSmrg 2203972599cfSmrg<para> 2204972599cfSmrgBellcore, "Framework Generic Requirements for X Window System Security," 2205972599cfSmrgTechnical Advisory FA-STS-001324, Issue 1, August 1992. 2206972599cfSmrg</para> 2207972599cfSmrg<para> 2208972599cfSmrgDardailler, Daniel, "Motif Drag And Drop Protocol," unpublished design 2209972599cfSmrgnotes. 2210972599cfSmrg</para> 2211972599cfSmrg<para> 2212972599cfSmrgKahn, Brian L., "Safe Use of X WINDOW SYSTEM protocol Across a Firewall", 2213972599cfSmrgunpublished draft, The MITRE Corporation, 1995. 2214972599cfSmrg</para> 2215972599cfSmrg<para> 2216972599cfSmrgRosenthal, David S. H., "LINX - a Less INsecure X server," Sun Microsystems, 2217972599cfSmrg29th April 1989. 2218972599cfSmrg</para> 2219972599cfSmrg<para> 2220972599cfSmrgRosenthal, David and Marks, Stuart W., "Inter-Client Communication Conventions 2221972599cfSmrgManual Version 2.0," ftp://ftp.x.org/pub/R6.1/xc/doc/hardcopy/ICCCM/icccm.PS.Z 2222972599cfSmrg 2223972599cfSmrg</para> 2224972599cfSmrg<para> 2225972599cfSmrgScheifler, Robert W., "X Window System Protocol," 2226972599cfSmrgftp://ftp.x.org/pub/R6.1/xc/doc/hardcopy/XProtocol/proto.PS.Z 2227972599cfSmrg</para> 2228972599cfSmrg<para> 2229972599cfSmrgTreese, G. Winfield and Wolman, Alec, "X Through the Firewall, and Other 2230972599cfSmrgApplication Relays," Digital Equipment Corporation Cambridge Research Lab, 2231972599cfSmrgTechnical Report Series, CRL 93/10, May 3, 1993. 2232972599cfSmrg</para> 2233972599cfSmrg</chapter> 2234972599cfSmrg</book> 2235