All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mickaël Salaün" <mic@digikod.net>
To: Tristan Schmelcher <tschmelcher@google.com>
Cc: linux-kernel@vger.kernel.org, Jeff Dike <jdike@addtoit.com>,
	Richard Weinberger <richard@nod.at>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	user-mode-linux-devel
	<user-mode-linux-devel@lists.sourceforge.net>,
	user-mode-linux-user@lists.sourceforge.net
Subject: Re: [PATCH v2 1/2] um: Set secure access mode for temporary file
Date: Sun, 6 Dec 2015 12:32:58 +0100	[thread overview]
Message-ID: <56641CEA.5080202@digikod.net> (raw)
In-Reply-To: <CADNZ+wSJtq9Ymx-2YcYe5XwwXTmMdbtsuBz6JHotnnwH3G7GKg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 528 bytes --]

On 04/12/2015 18:13, Tristan Schmelcher wrote:
> File permissions are checked at time of open, so I think this fchmod
> call has never had any effect.

Indeed, mmap doesn't require the file to be executable, only readable and writable. The fchmod seems to be a guarantee for this permissions but I don't see why a file newly created could not be writable.

> 
> If there is a concern that the mkstemp implementation may be insecure,
> why not set and restore the umask?
> 

I will add this safeguard.

 Mickaël


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

  reply	other threads:[~2015-12-06 12:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-29 14:03 [PATCH v2 0/2] um: Protect memory mapped file Mickaël Salaün
2015-11-29 14:03 ` Mickaël Salaün
2015-11-29 14:03 ` [PATCH v2 1/2] um: Set secure access mode for temporary file Mickaël Salaün
2015-11-29 14:03   ` Mickaël Salaün
2015-12-04 17:13   ` Tristan Schmelcher
2015-12-06 11:32     ` Mickaël Salaün [this message]
2015-12-06 11:57       ` Mickaël Salaün
2015-12-06 14:43       ` Mickaël Salaün
2015-12-08 20:37         ` Tristan Schmelcher
2015-12-08 20:37           ` Tristan Schmelcher
2015-12-08 21:45           ` Richard Weinberger
2015-12-08 21:45             ` [uml-devel] " Richard Weinberger
2015-12-09 23:58             ` Mickaël Salaün
2015-11-29 14:03 ` [PATCH v2 2/2] um: Use race-free temporary file creation Mickaël Salaün
2015-11-29 14:03   ` Mickaël Salaün
2015-12-04 17:26   ` Tristan Schmelcher

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=56641CEA.5080202@digikod.net \
    --to=mic@digikod.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richard@nod.at \
    --cc=tschmelcher@google.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    --cc=user-mode-linux-user@lists.sourceforge.net \
    /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.