xfs
[Top] [All Lists]

Re: umask fix (patch)

To: tridge@xxxxxxxxxxx
Subject: Re: umask fix (patch)
From: Keith Owens <kaos@xxxxxxxxxxxxxxxxx>
Date: Thu, 26 Jul 2001 13:11:56 +1000
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: Your message of "Wed, 25 Jul 2001 19:24:17 MST." <20010726022417.ECC8144E0@xxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
On Wed, 25 Jul 2001 19:24:17 -0700 (PDT), 
Andrew Tridgell <tridge@xxxxxxxxxxx> wrote:
>The problem turned out to be in the nfsd code. The following fixes it:
>
>--- fs/nfsd/nfssvc.c    2001/05/29 19:53:13     1.13
>+++ fs/nfsd/nfssvc.c    2001/07/26 02:27:26
>@@ -150,6 +150,7 @@
>        MOD_INC_USE_COUNT;
>        lock_kernel();
>        daemonize();
>+       current->fs->umask = 0;
>        sprintf(current->comm, "nfsd");
>        current->rlim[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY; 

Kernel threads share the init task fs context.  That change makes all
future kernel threads run with umask 0, a big security exposure.  This
problem was supposed to have been fixed in 2.4.7-pre7.


<Prev in Thread] Current Thread [Next in Thread>