lkml.org 
[lkml]   [2004]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectsecurity patch for drivers/char/n_tty.c
Date
Hello,

Recently while examining the Linux tty code I noticed that my
root password was still in read_buf some time after logging in,
long after it was "read".

I thought it might be a good idea to add a fix to clear out
characters after they're read. The patch seems to work all right.

This is for kernel 2.6.8.1 and the file is drivers/char/n_tty.c.

Enjoy,
Z Smith

Inline patch:

30a31,33
> *
> * 2004/09/20 by Z Smith (plinius@comcast.net): chars now truly erased upon
> * reading from read_buf for better security.
380a384
> tty->read_buf[head] = 0;
420a425
> tty->read_buf[tail] = 0;
1108a1114
> tty->read_buf[tty->read_tail] = 0;

-end-

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.019 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site