termios

Andries.Brouwer@cwi.nl
Sun, 16 Jul 1995 03:38:41 +0200


: From: "J. Kean Johnston" <root@tetrarch.paradigm.co.za>
: Date: Sat, 15 Jul 1995 10:24:05 +0000 (GMT)
: Subject: n_tty_ioctl() bug in 1.3.10 ?
:
: Hello all.
:
: I seem to have found a bug in 1.3.10. It manifested itself when using talk.
: As soon as I reply to a talk request, it connects fine but the first character
: that is typed by either party causes the following:
:
: [Connection established]
: stack segment: 0000
: EIP: 0010:00185cde
: EFLAGS: 00010286
: eax: bffff788 ebx: 00b8a000 ecx: 0008c660 edx: 0000001a
: esi: 0008c660 edi: 0000541b ebp: bffff788 esp: 00523f50
: ds: 0018 es: 0018 fs: 002b gs: 002b ss: 0018
: Process talk (pid: 732, process nr: 20, stackpage=00523000)
: Stack: 00b8a000 0008c660 0000541b bffff788 00000000 00000000 00180207 00b8a000
: 0008c660 0000541b bffff788 0000541b bffff788 00000010 bffff754 00b8a000
: 00000000 0010f96f 00000020 0012ec87 008b6ee0 0008c660 0000541b bffff788

It looks like you got a segmentation fault in n_tty_ioctl() while it
was processing a FIONREAD/TIOCINQ request. This can only happen, I think,
if tty->termios pointed at some random place.
Now the termios handling was changed in 1.3.10, so whoever wrote
that patch should recheck that tty->termios is always well-defined.