Autzoo.856
net.v7bugs,NET.v7bugs
utzoo!henry
Wed Aug  5 21:27:30 1981
ioctl speed-code checking
Nowhere in the V7 kernel does anything ever check that the speed codes
handed to a tty ioctl are valid (i.e. in the range 0..15).  Quite by
accident, all this will do to a DH or a DZ is screw up the line in
question.  But there is obviously room for all sorts of trouble here.
The simplest fix is to change the lines in dev/tty.c/ttioccomm(), about
line 236, that read:
               tp->t_ispeed = iocb.ioc_ispeed;
               tp->t_ospeed = iocb.ioc_ospeed;
to read:
               tp->t_ispeed = iocb.ioc_ispeed&017;
               tp->t_ospeed = iocb.ioc_ospeed&017;

-----------------------------------------------------------------
gopher://quux.org/ conversion by John Goerzen <[email protected]>
of http://communication.ucsd.edu/A-News/


This Usenet Oldnews Archive
article may be copied and distributed freely, provided:

1. There is no money collected for the text(s) of the articles.

2. The following notice remains appended to each copy:

The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996
Bruce Jones, Henry Spencer, David Wiseman.