All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: linux-kernel@vger.kernel.org
Subject: Re: link() security
Date: 15 Apr 2002 12:25:27 -0700	[thread overview]
Message-ID: <a9f9f7$cng$1@cesium.transmeta.com> (raw)
In-Reply-To: <20020411192122.F5777@pizzashack.org> <s5gpu11rpgx.fsf@egghead.curl.com>

Followup to:  <s5gpu11rpgx.fsf@egghead.curl.com>
By author:    "Patrick J. LoPresti" <patl@curl.com>
In newsgroup: linux.dev.kernel
> Actually, that is a horrible policy from a security perspective.  The
> shared mail spool itself is a poor design and always has been.
> 
> A better design is to use a separate spool directory for each user
> (/var/spool/mail/user/ or ~user/mail/ or somesuch), and only allow
> that user to access it at all.  This solves *all* of the security
> problems you mention:
> 
>    *) It avoids attacks based on race conditions, because you cannot
>       create files in somebody else's spool.
> 
>    *) Admins can manage space with quotas or partitions just like they
>       do for user home directories (i.e., it is a solved problem).
> 
>    *) You cannot link() to somebody else's spool file because you
>       cannot even read the directory in which it resides.
> 
> The solution to a fundamentally broken spool design is to fix that
> design, not to patch the kernel in nonstandard ways to plug just one
> of its multiple flaws.

Not to mention the fact that the single file mailbox design is itself
flawed.  Mailboxes are fundamentally directories, which news server
authors quickly realized.

	-hpa
-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt	<amsp@zytor.com>

  reply	other threads:[~2002-04-15 19:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-11 23:21 link() security xystrus
2002-04-12  1:15 ` Chris Wright
2002-04-13 16:59   ` Alan Cox
2002-04-13 17:02     ` xystrus
2002-04-14  1:49     ` Chris Wright
2002-04-15 14:44 ` Patrick J. LoPresti
2002-04-15 19:25   ` H. Peter Anvin [this message]
2002-04-15 22:48     ` Alan Cox
2002-04-15 23:05       ` H. Peter Anvin
2002-04-15 23:28         ` Alan Cox
2002-04-15 23:14           ` H. Peter Anvin
2002-04-16  0:01             ` Kurt Wall
2002-04-15 21:41   ` xystrus
2002-05-06  5:00     ` Albert D. Cahalan
  -- strict thread matches above, loose matches on Subject: below --
2002-04-13 17:48 Hank Leininger
2002-04-15 19:36 Chris Adams
2002-04-15 19:55 ` H. Peter Anvin
2002-04-15 20:36   ` Patrick J. LoPresti
2002-04-16  1:37     ` H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='a9f9f7$cng$1@cesium.transmeta.com' \
    --to=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.