[lkml]   [1998]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: swapfile security weakeness
On Thu, 5 Nov 1998, Brian Gerst wrote:

>> i've found that active swapfile could be deleted, which is
>> IMHO very dangerous (set immutable flag on in sys_swapon call?). Also,
>> sys_swapon should check whether owner of swapfile is root and is readable
>> only to root ( memory readableby anyone? hmm...)
>When you delete a file, you are just deleting the directory entry and
>decrementing the inode usage count by 1. Only when the inode is used 0
>time will the file actually be deleted from the filesystem. Opening the
>file counts in the inode usage count as well, so as long as the swap
>file is active, the file will still exist on the disk. Only when the
>swap file is deactivated will the file be really deleted. Changing the
>file's attributes may not work on all filesystems (like vfat/msdos, if
>you're really desperate for swap space).

My swap file was deleted while being used and instantly I got
kernel panics. The file was located on an MSDOS volume.

Mike A. Harris - Computer Consultant - Linux advocate

Linux software galore:

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:45    [W:0.068 / U:10.172 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site