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