From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#56108: 29.0.50; ASAN use-after-free in re_match_2_internal Date: Mon, 27 Jun 2022 16:26:02 +0300 Message-ID: <837d528cgl.fsf@gnu.org> References: <83mte7kv7c.fsf@gnu.org> <32e548cc-ffd3-4669-ad9a-317c130b0c93@Spark> <83a6a4kec0.fsf@gnu.org> <6e56407a-b564-4aa9-b74c-78883727ef09@Spark> <831qvgkc8d.fsf@gnu.org> <83sfnwisbb.fsf@gnu.org> <3146c990-63d9-4aa5-ab78-7bae2b7d6cd5@Spark> <835ykrg93i.fsf@gnu.org> <831qvfg876.fsf@gnu.org> <83tu8ad2qd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3667"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, 56108-done@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 27 15:27:26 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o5olx-0000qR-Qo for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Jun 2022 15:27:26 +0200 Original-Received: from localhost ([::1]:40374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o5olv-0007nz-IM for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Jun 2022 09:27:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5olb-0007ly-C8 for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 09:27:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56419) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o5olZ-0000tQ-W8 for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 09:27:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o5olZ-0000gD-SO for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 09:27:01 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Jun 2022 13:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 56108 X-GNU-PR-Package: emacs Mail-Followup-To: 56108@debbugs.gnu.org, eliz@gnu.org, gerd.moellmann@gmail.com Original-Received: via spool by 56108-done@debbugs.gnu.org id=D56108.16563363702541 (code D ref 56108); Mon, 27 Jun 2022 13:27:01 +0000 Original-Received: (at 56108-done) by debbugs.gnu.org; 27 Jun 2022 13:26:10 +0000 Original-Received: from localhost ([127.0.0.1]:50315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o5okk-0000ev-2X for submit@debbugs.gnu.org; Mon, 27 Jun 2022 09:26:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55992) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o5okf-0000eQ-P0 for 56108-done@debbugs.gnu.org; Mon, 27 Jun 2022 09:26:09 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37494) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5oka-0000Yc-Gt; Mon, 27 Jun 2022 09:26:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=1+uiIAxbJ2uqOkU/iZXleAUDjT1MZioYlqAeX0euRTo=; b=UUoQpXyKrKdQQVMkGGiV JEs/2ieEaLeLC/5iDf2OYxiafwqN8i48f0GYFjNaOMNSsYbeSvo1sHI5Hqbe0jmFY6BoBcIGQZoty uPgOhfwCv7SsnIzMiPZOBz/+3e8GJHWj81pncuRDAtAqymQoIz6UvXFHlcR+XWEc6bw8qQhoJjmeN VWLAwdv0xexodYct9BqpWMlpsk7C05RRrBb3zR/JnnJd4+OI1Q7vXinla2Z/KO1fus6Zk9GN3h7SX MvRzubB1/MBuUQgXSjPoaS1Vq1T6FxJmIoUB0ko1I2n7vcGR/ufshqMLvOwUBUom9eY3EkwBuIZbh QR7GmADvFPiOrg==; Original-Received: from [87.69.77.57] (port=3165 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5okZ-0003Nd-QI; Mon, 27 Jun 2022 09:26:00 -0400 In-Reply-To: (message from Gerd =?UTF-8?Q?M=C3=B6llmann?= on Fri, 24 Jun 2022 11:35:18 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:235455 Archived-At: > Date: Fri, 24 Jun 2022 11:35:18 +0200 > From: Gerd Möllmann > Cc: 56108@debbugs.gnu.org > > Please find patch attached. > > Some notes about the patch: > > * TRT, I think, would be to change the whole cacheing to use Lisp objects etc. I couldn't persuade myself > to do that. > * A less right thing, but better than the patch, would be to protect the cache entry in re_match_2_internal. > But that requires interface changes because re_match_2_internal currently doesn't know about cash > entries. I couldn't bring myself to do that either. Good points. Since there were no more comments, I've now installed this, and I'm marking the bug done. P.S. Gerd, please in the future try to remember to mention the bug number in the commit log message. (I added it this time, but I cannot be trusted to catch that every time ;-)