From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: [mwelinder@gmail.com: Emacs security bug] Date: Sat, 10 May 2008 10:50:17 -0400 Message-ID: <87mymy6wnq.fsf@stupidchicken.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1210431050 12485 80.91.229.12 (10 May 2008 14:50:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 10 May 2008 14:50:50 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Simon Marshall Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 10 16:51:27 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JuqPq-0003Ar-Sf for ged-emacs-devel@m.gmane.org; Sat, 10 May 2008 16:51:15 +0200 Original-Received: from localhost ([127.0.0.1]:39616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JuqP8-0006K6-DN for ged-emacs-devel@m.gmane.org; Sat, 10 May 2008 10:50:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JuqP4-0006Jv-I6 for emacs-devel@gnu.org; Sat, 10 May 2008 10:50:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JuqP2-0006JB-Id for emacs-devel@gnu.org; Sat, 10 May 2008 10:50:25 -0400 Original-Received: from [199.232.76.173] (port=33107 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JuqP2-0006J2-B8 for emacs-devel@gnu.org; Sat, 10 May 2008 10:50:24 -0400 Original-Received: from c-98-216-111-182.hsd1.ma.comcast.net ([98.216.111.182]:21371 helo=furry) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JuqOw-0000NR-Bl; Sat, 10 May 2008 10:50:18 -0400 Original-Received: by furry (Postfix, from userid 1000) id 694FCC049; Sat, 10 May 2008 10:50:17 -0400 (EDT) In-Reply-To: (Eli Zaretskii's message of "Sat, 10 May 2008 00:44:44 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:96936 Archived-At: Eli Zaretskii writes: > From: "Morten Welinder" > > 1. Create .emacs with contents > (global-font-lock-mode t) > (seq font-lock-support-mode 'fast-lock-mode) > > 2. Create foo.c with contents /* Nothing to see here */ > > 3. Create foo.c.flc with contents (message "Something to see here!") > > 4. Start Emacs and load foo.c > > - --> Observe that code from foo.c.flc is run. Not good. > (This is with Emacs 21.3.1; XEmacs is also affected, although step 1 needs to > be adjusted.) > > Suggestions: > > a. Remove "." from fast-lock-cache-directories. Littering little > files everywhere is not a good idea anyway. > > b. Don't use load to handle the .flc file. Instead read it into a > buffer and read one s-expression at a time and verify that it is sane > before evaluating it. Simon, could you take a look at this (you're listed as the author of fast-lock.el)?