From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tatsuya Kinoshita Newsgroups: gmane.linux.debian.devel.bugs.general,gmane.emacs.devel Subject: Bug#1021842: Finalizing 'inhibit-automatic-native-compilation' Date: Sun, 19 Feb 2023 23:31:31 +0900 (JST) Message-ID: <20230219.233131.1511069829833751131.tats%nobody@tats.iris.ne.jp> References: <20230218.061335.1468428093197134401.tats%nobody@tats.iris.ne.jp> <166586215062.368699.18398270685158383578.reportbug@convex> Reply-To: Tatsuya Kinoshita , 1021842@bugs.debian.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8876"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, spwhitton@spwhitton.name, 1021842@bugs.debian.org To: akrl@sdf.org Original-X-From: bounce-debian-bugs-dist=glddb-debian-bugs-dist2=m.gmane-mx.org@lists.debian.org Sun Feb 19 15:36:09 2023 Return-path: Envelope-to: glddb-debian-bugs-dist2@m.gmane-mx.org Original-Received: from bendel.debian.org ([82.195.75.100]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pTknR-0002Cl-Dl for glddb-debian-bugs-dist2@m.gmane-mx.org; Sun, 19 Feb 2023 15:36:09 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by bendel.debian.org (Postfix) with QMQP id 2E07320F99; Sun, 19 Feb 2023 14:36:09 +0000 (UTC) X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Sun Feb 19 14:36:09 2023 Old-Return-Path: Original-Received: from localhost (localhost [127.0.0.1]) by bendel.debian.org (Postfix) with ESMTP id 1B966210AD for ; Sun, 19 Feb 2023 14:36:09 +0000 (UTC) X-Virus-Scanned: at lists.debian.org with policy bank bug Original-Received: from bendel.debian.org ([127.0.0.1]) by localhost (lists.debian.org [127.0.0.1]) (amavisd-new, port 2525) with ESMTP id ZechKgAQSTpc for ; Sun, 19 Feb 2023 14:36:06 +0000 (UTC) Original-Received: from buxtehude.debian.org (buxtehude.debian.org [IPv6:2607:f8f0:614:1::1274:39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "buxtehude.debian.org", Issuer "Debian SMTP CA" (not verified)) by bendel.debian.org (Postfix) with ESMTPS id 41D7F20F99; Sun, 19 Feb 2023 14:36:06 +0000 (UTC) Original-Received: from debbugs by buxtehude.debian.org with local (Exim 4.94.2) (envelope-from ) id 1pTknK-004y5f-Me; Sun, 19 Feb 2023 14:36:02 +0000 X-Loop: owner@bugs.debian.org Resent-From: Tatsuya Kinoshita Original-Sender: Tatsuya Kinoshita Resent-To: debian-bugs-dist@lists.debian.org Resent-CC: Rob Browning X-Loop: owner@bugs.debian.org Resent-Date: Sun, 19 Feb 2023 14:36:01 +0000 Resent-Message-ID: X-Debian-PR-Message: followup 1021842 X-Debian-PR-Package: emacsen-common X-Debian-PR-Source: emacsen-common Original-Received: via spool by 1021842-submit@bugs.debian.org id=B1021842.16768171661182296 (code B ref 1021842); Sun, 19 Feb 2023 14:36:01 +0000 Original-Received: (at 1021842) by bugs.debian.org; 19 Feb 2023 14:32:46 +0000 Original-Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:46741) by buxtehude.debian.org with esmtps (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim 4.94.2) (envelope-from ) id 1pTkkA-004xYy-H4 for 1021842@bugs.debian.org; Sun, 19 Feb 2023 14:32:46 +0000 Original-Received: by mail-pj1-x102a.google.com with SMTP id mi8-20020a17090b4b4800b002349579949aso643272pjb.5 for <1021842@bugs.debian.org>; Sun, 19 Feb 2023 06:32:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to:from :subject:cc:to:message-id:date:sender:from:to:cc:subject:date :message-id:reply-to; bh=W4NKHzw9b7+w4SYdyCwgBwdYcMpazWfKbgwyA5t4N5Y=; b=M9X7IGLePiAHsp/NgrHpqnxl/QtE9YIzwTWikrWR1r1SNFtpPRVvXyE8XgNzwg9DEA Xzcqga0Zc8I3ppcgIVbDQPeD02KI110LvftzXC2h0QWOoAPpky8gfHzdzVMQ7d+h6FXG NE3vVpPF6jmvArSQlD7FHXBc94TFVdal5GgGd+4qsK7vuMbhjzWXZ35xUHrfGQiZoqKB 15aso240vK8GD9XunV85QmgOj3RKl5Q51hiPotawC1yq05Zv+y/6xVCKM02lCvWiqddh 2ABa2JxJFpbspBOlGe1/IdzuOZOZCQjbARcOr+vzOL6A+hcQxobuT1UjYldbunV3JwHb gu2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to:from :subject:cc:to:message-id:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W4NKHzw9b7+w4SYdyCwgBwdYcMpazWfKbgwyA5t4N5Y=; b=dc7wo7/5SlZ+vILuuxq8YIvOD6sXxqLrCuY3Qpx2D8bcMJkTgn7uAJhSjxU5w04Am4 jfBp7iCa4Pyb0S+vu+gvqew9Ao9RUAj402gF7ktHOvxEsVQIZprDPnPVKnCWpw/ubdNV SHnPgWPDzCQfb9OlMQj+WLez83KSP+HDeChNv9IzN7dS5TPUa7Q7m7Sc5Gx1KWHl42QD 4ePgv5uJt8QXYBIQAQWK/AQ136uaDa2KaLOPlT29nPO4Zi/FqgKabmmB0eTmXMYjgyiw 0dP9Z+mpfrnLEDE7HfKAHAm9GQ6aSAka7ZV+JIdGzj6s6FUu6LP1ch4RE2S0EOHd/wmZ 3iTA== X-Gm-Message-State: AO0yUKU5wEg7wKSEA11rGCAd37tICt1Kh1c6szJABcdt4kjaepcoLwlo kJWdiuEveYrt0TfTWZ/QuzX5VcsPobtfiw== X-Google-Smtp-Source: AK7set8d7oMTdlRB7Tv8Vyqj0iiJaiMMV9cjNW16NHiRUL68pWfL+y+RIKyS9aIHLRzSFbeFKiZGUA== X-Received: by 2002:a05:6a20:a88a:b0:c7:2c6c:b37b with SMTP id ca10-20020a056a20a88a00b000c72c6cb37bmr12463854pzb.23.1676817163649; Sun, 19 Feb 2023 06:32:43 -0800 (PST) Original-Received: from localhost ([2400:4150:4060:4700:d657:2ecb:8598:317]) by smtp.gmail.com with ESMTPSA id e2-20020a637442000000b004fb4489969bsm649228pgn.49.2023.02.19.06.32.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Feb 2023 06:32:42 -0800 (PST) Original-Sender: Tatsuya Kinoshita In-Reply-To: X-Debian-Message: from BTS X-Mailing-List: archive/latest/1760886 X-Loop: debian-bugs-dist@lists.debian.org List-Id: List-URL: List-Post: List-Help: List-Subscribe: List-Unsubscribe: Precedence: list Resent-Sender: debian-bugs-dist-request@lists.debian.org Xref: news.gmane.io gmane.linux.debian.devel.bugs.general:1838530 gmane.emacs.devel:303570 Archived-At: On 2023-02-18 at 21:56 +0000, Andrea Corallo wrote: > >> + (expand-file-name > >> + (make-temp-file-internal (file-name-sans-extension rel-filename) > >> + 0 ".eln" nil) > >> + temporary-file-directory)))) > > > > Hmm, it seems using make-temp-file-internal with DIR-FLAG=0 which just > > constructs a name and do not create the file like make-temp-name, so > > there is a race condition as Stefan mentioned. Is that really OK? > > Mmhh, Stefan mentioned the case where the tmp file name is predicted. > > Shouldn't make-temp-file-internal return a non predictable file name? > Otherwise what's the point of using make-temp-file in the first place if > the temporary name is predictable? Imagine if a local attacker creates symlinks as the candidate names before creating the file, though less predictable. make-temp-name describes as follows: > There is a race condition between calling `make-temp-name' and > later creating the file, which opens all kinds of security holes. > For that reason, you should normally use `make-temp-file' instead. To create a temporary file in a secure fashion, use make-temp-file to create a file, or use make-temp-file with DIR-FLAG to create a subdirectory and then create a file in it. Thanks,