public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Deadlock in serial driver 2.6.x
@ 2005-01-26 13:20 Martin Kögler
  2005-01-27  7:13 ` Andrew Morton
  0 siblings, 1 reply; 10+ messages in thread
From: Martin Kögler @ 2005-01-26 13:20 UTC (permalink / raw)
  To: linux-kernel

I noticed with different kernel versions (a 2.6.5 FC2 Kernel, a 2.6.7 Knoppix Kernel
and 2.6.10 FC2 and FC3 Kernels (which have no patches for the serial driver)), that it 
is possible for a normal user, which has rw access to /dev/ttySx, to hang a computer.
To exploit it, there must be a device on the other end on the serial line, which sends 
some data.

I tested it on a i686 machine.

At http://www.auto.tuwien.ac.at/~mkoegler/linux/serial_oops.c , I have an example programm,
which exploits the problem (/dev/ttyS0 is hardcoded as serial device).

To trigger the problem, connect two computers with a null modem cable and send some
characters to the programm (The baud rate at the other computer seems to be not important).

With SMP-Kernels, the computer stops responding.
Kernels without SMP print a panic message before they stop working, eg:
Kernel panic - not syncing: drivers/serial/serial_core.c:103: spin_lock(drivers/serial/serial_core.c:c04055e0) already locked  by drivers/serial/8250.c/1170

Photos of a panic messages of a FC3 2.6.10-1.741_FC3 Kernel are available at 
http://www.auto.tuwien.ac.at/~mkoegler/linux .

What the programm does:
It sets the low latency mode, then waiting, until a certain state of the handshake 
lines is reached, then it sends a bytes and waits for a byte. Then it changes the 
handshake lines again and the process starts again.

Martin Kögler
e9925248@stud4.tuwien.ac.at
PS: Please CC me on replies.

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

end of thread, other threads:[~2005-02-04 13:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-26 13:20 Deadlock in serial driver 2.6.x Martin Kögler
2005-01-27  7:13 ` Andrew Morton
2005-01-30 15:39   ` Alan Cox
2005-01-30 16:48     ` Russell King
2005-01-31  7:37       ` Alan Cox
2005-01-31  8:48         ` Andrew Morton
2005-02-03 10:02           ` Alan Cox
2005-02-03 18:21             ` Andrew Morton
2005-02-04 11:07               ` Martin Kögler
2005-02-04 13:50                 ` Paul Fulghum

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