From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68604 invoked by alias); 31 May 2019 12:54:00 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 68596 invoked by uid 89); 31 May 2019 12:54:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_40,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Spam-Relays-External:Sendmail, H*RU:Sendmail, UD:m, pm X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 31 May 2019 12:53:59 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id x4VCro35006406 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 May 2019 08:53:55 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca x4VCro35006406 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1559307236; bh=qrDBD4Qryi1VdoXZ3AJlq8rW19vqsXTcD7GcNWDD3F4=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=HnEy+W7kCoMdPUE8D2h2L8mJ/HYreu2gA+NqGsxGigw+Dsm7DL3zYMF3ZVvV62RXi LZhjNCsGymZsQ9hGgOp4uKbz0vn9rbvjJ2mBvP02kCFmqn9NJUGg9ypAjUh4Ee6seF t/Dm46O1chBHs9oBZcrTWsojvHJDCUy0YB5bvx84= Received: from [172.16.0.120] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id EC2171E623; Fri, 31 May 2019 08:53:47 -0400 (EDT) Subject: Re: [PATCH][gdb] Fix heap-buffer-overflow in cp_find_first_component_aux To: Tom Tromey , Tom de Vries Cc: gdb-patches@sourceware.org References: <20190525093527.GA2911@delia> <871s0hxf8t.fsf@tromey.com> From: Simon Marchi Message-ID: <4c61d95b-7253-b1c9-abea-dcf5483c0e27@polymtl.ca> Date: Fri, 31 May 2019 12:54:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <871s0hxf8t.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-05/txt/msg00741.txt.bz2 On 2019-05-29 2:55 p.m., Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries writes: > > Tom> [gdb] Fix heap-buffer-overflow in cp_find_first_component_aux > > Tom> gdb/ChangeLog: > > Tom> 2019-05-25 Tom de Vries > > Tom> PR gdb/24618 > Tom> * dwarf2read.c (struct mapped_index::symbol_name_slot_invalid): Make > Tom> sure an empty slot (defined by a 32-bit zero pair) is recognized as > Tom> invalid. > > Thanks for the patch and the excellent analysis. > > I looked at the history here a little and the earlier code did: > > - if (bucket.name == 0 && bucket.vec == 0) > > ... so this seems to have just been a simple error in the patch. > > This is ok, please check it in. > > Tom Agreed, I was able to reproduce the failure, and the fix LGTM. Simon