Undermining XGrabKeyboard

Sebastian seppschrot at gmx.de
Tue Mar 4 08:16:18 PST 2008


Hello,

even a non-setuid application can make a core grab requesting all input
with a XGrabKeyboard(d,w,True,GrabModeSync,GrabModeSync,CurrentTime).

If it fails to propagate this input unconsciously or maliciously, this
results in a non-responding desktop where I can not intervene even with
the Ctrl+Alt+Backspace or the virtual terminal combos. (Running on a
i386 Linux) 

As I can't remote login into the machine this means the machine is
effectivly hung at this point (even if it's not in a technically sense).

I would like to implement some kind of Sys-Req key event (other than the
reset/power switch) that can't be hindered by a non-privileged user
application. One single key-down event that can reach another
application would be enough for a start. But I am unsure on which
protocol level I should hook into.

The XEVIE extension sounded sufficent low-level first but it turned out
that even these events came through. (They stack up until ungrabbing.)

Do you think this bypass can be achieved by an extension at all?
Or do I really have to go deeper? Maybe some other approach that is
unobvious to me?


regards and thanks for any help
Sebastian




More information about the xorg mailing list