From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753180AbbLFOu0 (ORCPT ); Sun, 6 Dec 2015 09:50:26 -0500 Received: from 19.mo1.mail-out.ovh.net ([178.32.97.206]:48964 "EHLO 19.mo1.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752678AbbLFOuZ (ORCPT ); Sun, 6 Dec 2015 09:50:25 -0500 Subject: Re: [PATCH v2 1/2] um: Set secure access mode for temporary file To: Tristan Schmelcher References: <1448805802-12156-1-git-send-email-mic@digikod.net> <1448805802-12156-2-git-send-email-mic@digikod.net> <56641CEA.5080202@digikod.net> Cc: linux-kernel@vger.kernel.org, Jeff Dike , Richard Weinberger , Greg Kroah-Hartman , user-mode-linux-devel , user-mode-linux-user@lists.sourceforge.net From: =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= X-Enigmail-Draft-Status: N1110 Message-ID: <566449A3.6030504@digikod.net> Date: Sun, 6 Dec 2015 15:43:47 +0100 User-Agent: MIME-Version: 1.0 In-Reply-To: <56641CEA.5080202@digikod.net> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jElCOM4HFlslsAGuBtCcCEA6UIBjexP0I" X-Ovh-Tracer-Id: 5309743962091333959 X-Ovh-Remote: 94.23.54.103 (ns3096276.ip-94-23-54.eu) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: -100 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeekiedruddtucetufdoteggodftvfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeekiedruddtucetufdoteggodftvfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --jElCOM4HFlslsAGuBtCcCEA6UIBjexP0I Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/12/2015 12:32, Micka=C3=ABl Sala=C3=BCn wrote: > On 04/12/2015 18:13, Tristan Schmelcher wrote: >> If there is a concern that the mkstemp implementation may be insecure,= >> why not set and restore the umask? >> >=20 > I will add this safeguard. Well, I'm concerned to use umask because it is not thread-safe and driver= s may use create_mem_file() in a multi-theaded context. I prefer to stick= to fchmod and handle the race-condition with O_TMPFILE unsell someone is= sure that this will not create bugs :) Micka=C3=ABl --jElCOM4HFlslsAGuBtCcCEA6UIBjexP0I Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCgAGBQJWZEmjAAoJECLe/t9zvWqVhNYH/R9MW4vraQsFk20vPa7vIGgP a+ijYQxbEj9onoaQ/didHLB/rBUC4mphzyLsqr+SlbhyQMluRYn5oaYteka0/z/X SujyElLO1PNLiRftzLn4GQxUG88nVOWbQdpeZ/5eWYJytAhgGEBv8c4gnv86bpfM INxSTl7bneyPL1m4uBaeD1JN9NgRp58Fb+CdAtk6FQ4yIljb+rrkuOOFDbpmWfw4 LhQzgNlKVp5o4CeTdKqbUNdSY3pSSNRRP9M8C+841hVhIJ92SSMCfvbKUQXcJ4zU IhGOJNdRAzDWuAsfD7UzWd/bduPTlw4Q2I5RNW8gzalQh41rO5yRk2C4hyNzO5U= =09pq -----END PGP SIGNATURE----- --jElCOM4HFlslsAGuBtCcCEA6UIBjexP0I--