mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Not so theoretical race in atkbd_command
@ 2004-04-26 21:35 Pavel Machek
  2004-04-26 22:49 ` Pavel Machek
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Machek @ 2004-04-26 21:35 UTC (permalink / raw)
  To: kernel list, vojtech

Hi!

There's quite real race in atkbd_command:

static int atkbd_command(struct atkbd *atkbd, unsigned char *param,
int command)
{
        int timeout = 500000; /* 500 msec */
        int send = (command >> 12) & 0xf;
        int receive = (command >> 8) & 0xf;
        int i;

        atkbd->cmdcnt = receive;
[user presses key here]

atkbd_interrupt eats user keypress, thinking its reply. Boom. To
exploit:

while true; do setleds +num; setleds -num; done

then try typing.
							Pavel
-- 
934a471f20d6580d5aad759bf0d97ddc

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-04-26 22:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-26 21:35 Not so theoretical race in atkbd_command Pavel Machek
2004-04-26 22:49 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome