Re: inodes are not cleared!

Bill Hawes (whawes@star.net)
Thu, 23 Jul 1998 07:29:51 -0400


Savochkin Andrey Vladimirovich wrote:
>
> On Wed, Jul 22, 1998 at 11:01:20PM +0400, kuznet@ms2.inr.ac.ru wrote:
> [...]
> > The last question: is i_flags the only field not initialized
> > properly in socket.c?
>
> Unfortunately, no.
>
> I've found a group of struct inode fields that are never initialized
> for sockets and some filesystems. They are not important for the functionality
> but they are reported via stat call causing information leak from inodes
> you have no access to or from processes if just free'd memory has been reused.
>
> Some fields (like i_rdev) are not initialized in most filesystems!
>
> Here is a patch fixing initialization of sockets.

Another possibility we could consider would be modify the VFS where
needed to treat sockets differently. There is a flag saying whether an
inode belongs to a socket, and in some cases is may make more sense to
process the socket inode differently rather than set up fields that have
no use for sockets.

Regards,
Bill

-
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