As said elsewhere, locking X is really hard, and xscreensaver architecture doesn't help. This week I managed to crash xscreensaver login prompt twice, unlocking the desktop without entering my password, and that was the last straw, I switched to xsecurelock which separates the login entry into another process, making such bugs much less severe.
Unfortunately I can't reliably reproduce the crash. A hardware fuzzer (also known as a faulty ThinkPad keyboard) was involved, and I don't possess the device any more. I think what it did was press certain keys very often — the keyboard matrix is sampled at 125 Hz, so I'm guessing it was pressing the keys about 60 times per second, but I'm not sure which keys they were. If anyone manages to reproduce this, please do give me a shout. :-)
That is how it is implemented (in X11)
Warning: copy-paste this link, if jwz sees an HN referrer, you won't be happy.
www.jwz.org/blog/2015/04/i-told-you-so-again/
I’m pretty sure I’ve seen what everyone is talking about and it’s bothered me a little too (granted, my machine is configured in such an undiscoverable way that just opening an xterm window is obscure enough to be nearly equivalent to a very short pin, and then you need to know bash. Now that I’m not in college and don’t have anything important that’s probably good enough even without xcreensaver.)
It's a joke but sometimes I really do wonder.
> Right now with screensavers under X it's basically capturing the input and continually redrawing over the display. > With Wayland, Kristian plans for the lock-screen to be part of the Wayland compositor. In having the compositor handle the screensaver role, it can ensure that no window can appear atop the screensaver surface, it can properly detect idling and grabs already, and has complete control over the screen. Unlike the X design, there wouldn't even need to be a screensaver "window" that's on top but the compositor could just keep painting a black screen. For those interested in a "fancy screensaver", a plug-in could be used or an out-of-process Wayland client for drawing whatever you desire.