[lkml]   [1998]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: swapfile security weakeness

On Thu, 5 Nov 1998 20:39:18 +0100 (CET), Jakub Vlasek <>

> 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...)

2.0 or 2.1? I've just tried on 2.1.127 and it is working fine: the file
is unlinked but not deleted and the filesystem space remains reserved.

On Fri, 6 Nov 1998 08:40:01 +0100 (CET), Rik van Riel
<> said:

> Unfortunately, there are a few issues with that:
> - it doesn't work on inodeless FSes (msdosfs)

Not true. All filesystems have inodes.

> - you can't swapoff() a deleted file, leaving minor
> fs corruption on reboot (and major corruption on
> umsdos and the like)

That's no different to the normal case of rebooting with a file still
open. At least on ext2, the filesystem will automatically be re-fscked
on boot.

> - since you can't swapoff() the deleted file, you
> can't reclaim the disk space

The fsck will fix things up.


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:1.816 / U:1.252 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site