public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: daw@taverner.cs.berkeley.edu (David Wagner)
To: linux-kernel@vger.kernel.org
Subject: Re: Fchown on unix domain sockets?
Date: Mon, 1 Nov 2004 22:27:51 +0000 (UTC)	[thread overview]
Message-ID: <cm6d97$uts$1@abraham.cs.berkeley.edu> (raw)
In-Reply-To: Pine.LNX.4.53.0411011546050.30106@yvahk01.tjqt.qr

Jan Engelhardt  wrote:
>How about setting the permissions beforehand?

This makes you susceptible to TOCTTOU (race condition) attacks in some
cases.  Often, the only way to change ownership or permissions of a file
you want to operate on securely is to use fchown()/fchmod() etc.

It came as a surprise to me that open() + fchown()/fchmod() does not
work in some cases that chown()/chmod() do.  I wonder whether this has
any effect on applications.  Could this result in security holes in
applications that are unaware of this property?

      parent reply	other threads:[~2004-11-02  5:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-31 22:55 Fchown on unix domain sockets? John M Collins
2004-11-01 14:20 ` Jan Engelhardt
2004-11-01 14:41   ` John M Collins
2004-11-01 14:49     ` Jan Engelhardt
2004-11-01 15:43       ` John M Collins
2004-11-01 17:27         ` Jan Engelhardt
2004-11-01 22:27       ` David Wagner [this message]

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='cm6d97$uts$1@abraham.cs.berkeley.edu' \
    --to=daw@taverner.cs.berkeley.edu \
    --cc=daw-usenet@taverner.cs.berkeley.edu \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox