Message ID | ZOQcGOqFn749Uarv@squeak.grove.modra.org |
---|---|
State | Accepted |
Headers |
Return-Path: <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b82d:0:b0:3f2:4152:657d with SMTP id z13csp3366289vqi; Mon, 21 Aug 2023 19:23:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHUqowSfLbeSOJedgwNLvYdWQn4/q6+PPp/XwGDv2zK1bOOGvtCfzY/QGM2YxiBYNQ2+0Ns X-Received: by 2002:aa7:d651:0:b0:528:1b00:8efb with SMTP id v17-20020aa7d651000000b005281b008efbmr6763640edr.5.1692671014907; Mon, 21 Aug 2023 19:23:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692671014; cv=none; d=google.com; s=arc-20160816; b=sKW65EqzcL0HhRkto1Op3U5D6evGfc7bKEN20ASakQQ0plU2LvAdNWUivNczUDO1xs M2bfY6VeSiKi4s+dHU4fhpGbws0Rqij5cZuCedcd/pyMX5Gx4VfeYwdcTezOtTXPaGnG LUbwKr3SNiWDznB0mkxwvfOUAqY815SxqGCUY8EmO+lCJgBjHW5QqBJ2+1Wv9x0LuOYV qOEnWPDPLh/A8VITgxiDKftsWWNInCpHNmC5KmG6yjwG9davPBevc2WppXTRd8I93CXe FnRcg4yznJYY23GbBIuLQk8kVFP7g2yW6WPiucXzOXlUOOXiSxmkJ/kqjflAHdHhrWie Yhow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=oXGxBhX1KX1V3lHzX9+0XNP3irBFO+SIfwmoV4n2/ZI=; fh=HNIqzTA9Dp00ovCAyCdXfuEvWDT00OlFxFRPLybXRis=; b=yvDdMA/NFwJUQKx+aNYV7J9DRiITFOgJcK4IkelFOwel7rl/UUpVAuzI+1jefO5sPs JikFGTY+0k8vyAQDSJrWffwiMVg60Oqcnn1MPCFWIiIgpAwpwlsVktNM/3NdVl7EJW1o FlhV3dC+EnPzi94PBxciS6Y4f2uHXeD9ZKQkTnBU6E93wUIphfa8xgcqzozCtmvGr23m Hwv1jKpVIDhYVww97SnluGXBNYGck34K70n0f6CYLuR9tQO/dEEQhvezNdHPV0QS0cTu y2NFbtdsZVpF5x+trf82mTkRvp2HRg6l1JQfXCNKCG0PLofA3u2RiZtSPVLKKUvZg4wP i3Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=AZ5Tie6d; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id k12-20020aa7c38c000000b0052336550ddcsi6815722edq.112.2023.08.21.19.23.34 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Aug 2023 19:23:34 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=AZ5Tie6d; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 96A5F3857355 for <ouuuleilei@gmail.com>; Tue, 22 Aug 2023 02:23:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 96A5F3857355 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692671013; bh=oXGxBhX1KX1V3lHzX9+0XNP3irBFO+SIfwmoV4n2/ZI=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=AZ5Tie6dC9JoQETHrJ0i/Gle7wN6HEgDTrkrv99GVjHtVtTe9nq8XqfhEOA+FcNcT dFEMw619/J5yi8AiXQzG5nReMQRLn8I929mB/e7cYE+YWkYtjgpghqZAvjiimk35Ns 0CoWaVe8tAemVn0zzXVG+hQNRfaGclLBYFIIVpzg= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by sourceware.org (Postfix) with ESMTPS id 7DE7F3858D33 for <binutils@sourceware.org>; Tue, 22 Aug 2023 02:23:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7DE7F3858D33 Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-3a76cbd4bbfso2964357b6e.3 for <binutils@sourceware.org>; Mon, 21 Aug 2023 19:23:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692671003; x=1693275803; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oXGxBhX1KX1V3lHzX9+0XNP3irBFO+SIfwmoV4n2/ZI=; b=d5nbkQ3yUx0EWe1sn8QBbnXZZRvaIq0eqmgV/gpjjeMXytHzkkNz6X/js4Ae6zh/Ar p2cNZ85DV1+JgwCX2a/7XWDHF9SejQtABN/fPMTxQeerSWHlYiFlx1VdPmoYBndifhIp 1Uy+zlXQs3PVwoKgPHx9+qIvgWsCukVtdAAUq7DNLBcppTd5fpLeksZ5h6ZjJSm3y1xw 7j37r5T3SIONBkAmIfnT/2HcUtpbZpRQKtu+pTrwBQMie3xkA0IRiyX76pvEAC8yagry qd2K3NylxC5j1Xe8YS9kF2KwBPYkVCPVrma3gbGFA0GIjEj2dQk+Yyxtf2nSu5Xc/2uP dDSw== X-Gm-Message-State: AOJu0YwdfKMybtaSwOVpFgasnM230hvJ/MrdW75ym6aqvOvpC0FSfpIY tbvyjH4OqnRuTmL2zN0+y8LoklfcD+4= X-Received: by 2002:a05:6808:c:b0:3a3:6360:ffbe with SMTP id u12-20020a056808000c00b003a36360ffbemr9734500oic.24.1692671003279; Mon, 21 Aug 2023 19:23:23 -0700 (PDT) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id bm2-20020a056a00320200b0068a2d78890fsm4614057pfb.10.2023.08.21.19.23.22 for <binutils@sourceware.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Aug 2023 19:23:22 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 407EE11423DC; Tue, 22 Aug 2023 11:53:20 +0930 (ACST) Date: Tue, 22 Aug 2023 11:53:20 +0930 To: binutils@sourceware.org Subject: objdump: file name table entry count check Message-ID: <ZOQcGOqFn749Uarv@squeak.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3034.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> From: Alan Modra via Binutils <binutils@sourceware.org> Reply-To: Alan Modra <amodra@gmail.com> Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774894201753144119 X-GMAIL-MSGID: 1774894201753144119 |
Series |
objdump: file name table entry count check
|
|
Checks
Context | Check | Description |
---|---|---|
snail/binutils-gdb-check | success | Github commit url |
Commit Message
Alan Modra
Aug. 22, 2023, 2:23 a.m. UTC
Fuzzers have found that objdump -W takes a really long time if the entry count uleb is ridiculously large, and format attributes don't consume data (which doesn't make sense for a table of names). * dwarf.c (display_formatted_table): Sanity check count of table entries.
diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 4f695bf2bca..3ebc45ae373 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -4313,10 +4313,10 @@ display_formatted_table (unsigned char *data, printf (_("\n The %s is empty.\n"), table_name); return data; } - else if (data >= end) + else if (data >= end + || data_count > (size_t) (end - data)) { - warn (_("%s: Corrupt entry count - expected %#" PRIx64 - " but none found\n"), table_name, data_count); + warn (_("%s: Corrupt entry count %#" PRIx64 "\n"), table_name, data_count); return data; }