n_tty.c not checking for errors

Pavel Machek (pavel@bug.ucw.cz)
Tue, 25 Aug 1998 23:57:02 +0200


Hi!

I found out that n_tty.c does not handle errors too good. Namely, in
read_chan in does put_user() without checking for its result at 3
places... This has strange results such as:

void
main(void)
{
read(0,0xc0110d6c,10);
}

If you strace this program on console on 2.1.117, you'll see that read
indicated success... Which is something it should not do.

getuid() = 8
getgid() = 100
getegid() = 100
read(0, asdfasdfasdf
0xc0110d6c, 10) = 10
_exit(10) = ?

Pavel

-- 
I'm really pavel@atrey.karlin.mff.cuni.cz. 	   Pavel
Look at http://atrey.karlin.mff.cuni.cz/~pavel/ ;-).

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html