From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta36.uswest2.a.cloudfilter.net (omta36.uswest2.a.cloudfilter.net [35.89.44.35]) by sourceware.org (Postfix) with ESMTPS id A69823858C27 for ; Mon, 13 Nov 2023 17:15:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A69823858C27 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A69823858C27 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699895741; cv=none; b=GN+KkZLsFsoewx0xLHWx8SJ6qaoocOd0Hu/Z7SbX4tlXlSRfHvH0aKe7KqglIdSD6wLmeq1HX67w0DgoAmCJDAprGlgiQabomDemmCh1H1VwdgwAa40Jx1VYwCVuTjq99THFucUnLNbxTFO0ZOooXchDdk8dP1azOaT2KkxHdxI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699895741; c=relaxed/simple; bh=dRcFEclYZkZtEfT+iBTq39dVFqTtoBVyHL2LBinzpOM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=RClfoaVfHtZkRr+ES5+dtwDHYQ6GeMHOttRZaC1kAj+HBN8I+gS6eZoZQuyfLKZ710VJQWm5Lf1YYw71RojaevTPtuA0PcDGuLaRe61mXhNz6W7K4hlPQJJArzQ9VYXje1Rs4W9B2BzIxtKuD4OZe2gs2oqmkSIDYR2rkPpFVNY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5009a.ext.cloudfilter.net ([10.0.29.176]) by cmsmtp with ESMTPS id 2YTsr5SI6hqFd2aXCrZGwY; Mon, 13 Nov 2023 17:15:38 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 2aXBr3bXv97pz2aXCrBs6h; Mon, 13 Nov 2023 17:15:38 +0000 X-Authority-Analysis: v=2.4 cv=ULDOoQTy c=1 sm=1 tr=0 ts=655259ba a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=BNY50KLci1gA:10 a=Qbun_eYptAEA:10 a=QyXUC8HyAAAA:8 a=RoMdBYoJ-GZgDtgVvA4A:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=D8vNRVupP49yKYKaVZXv5zUam41Qu6vCsHdyr9Flcuw=; b=xIKgT6APYj+W7C6+8pLzSAOXfe aa14y4Ww7momc92QrDAzgODrEunHuV/2hOPGDf6xLVWz43TySuPo9aaiMw3uWliO/42+ixyQ2ck5f F0J2XMF3QjjDud05DRNDPdxBg; Received: from 97-122-77-73.hlrn.qwest.net ([97.122.77.73]:46054 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1r2aXB-002EL8-1C; Mon, 13 Nov 2023 10:15:37 -0700 From: Tom Tromey To: "Willgerodt, Felix" Cc: Keith Seitz , "gdb-patches@sourceware.org" Subject: Re: [PATCH 1/1] gdb: Fix segfault with a negative .dynamic section size References: <20231110091627.2139626-1-felix.willgerodt@intel.com> X-Attribution: Tom Date: Mon, 13 Nov 2023 10:15:36 -0700 In-Reply-To: (Felix Willgerodt's message of "Mon, 13 Nov 2023 09:58:14 +0000") Message-ID: <87fs19tw07.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.77.73 X-Source-L: No X-Exim-ID: 1r2aXB-002EL8-1C X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-77-73.hlrn.qwest.net (murgatroyd) [97.122.77.73]:46054 X-Source-Auth: tom+tromey.com X-Email-Count: 7 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfAPWS3SB/VTXwefhPWQhLwx8nPw1pmExh8NsPLHEGl0gqXzNAvFnjlPh0pQSzkSPazfPrHH+kNi2RqG5ek4+e5MXt0cT3G/UahG6wEhQauEUV0Ywe+jo x8imr24BzvmX2HKiCz/na8uDjlWj8U6mgOE7eMhWzOoIul4Hk0aRhCm8Bwon9+9ILRb8Eect8DhKCEfFryb9g0SQuExNOaK/9uE= X-Spam-Status: No, score=-3018.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> Willgerodt, Felix writes: > BFD: warning: bin/poc has a section extending past end of file > Reading symbols from poc... > warning: Loadable section ".dynamic" outside of ELF segments > in bin/poc > warning: Discarding section .dynamic which has a section size (fffffffa40) larger than the file size [in module bin/poc] > About size validation: > I don't see how we can realistically do that. We don't want to restrict > users that have a big binary and enough system memory. > Nor do I see any indication that this is a real world problem right now, > and that there are users with a big .dynamic section that experience > memory pressure and still want to debug. > To me the state with my patch is good enough. There are warnings > to figure this out easily. And we even get the backtrace now. It seems from the above that BFD is doing some simple sanity checks, like a section cannot be larger than the file. So maybe gdb could replicate or reuse these. Tom