| Message ID | aorPTufUC8QEMFzZ@squeak.grove.modra.org |
|---|---|
| State | New |
| Headers |
Return-Path: <binutils-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A951E4BA79A0 for <patchwork@sourceware.org>; Sun, 23 Aug 2026 10:46:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A951E4BA79A0 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=T9luIVfY X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by sourceware.org (Postfix) with ESMTPS id 398B04BA23F1 for <binutils@sourceware.org>; Sun, 23 Aug 2026 10:45:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 398B04BA23F1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 398B04BA23F1 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1029 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787481939; cv=none; b=tm3MGrJmKsjvgahsPGiGDctql0w40xZ4xtlIfoEbXTib0DQU+6ZLNB3DVUmB+igDI1uUYxLNAu6cxrpYUMx1Bh3iWitLfDPonzeEfPw1GCx5IzCDV9ldHLFNGGsetNKWd9KGfXlpCuCGdsdPPIjtg1cArKoFTXxICGTDDHly4PI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787481939; c=relaxed/simple; bh=j3ovwsDNxx0Z8c2QXHkLIKV7L6GpcnKJ+TdMthnabsI=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=CcN4OxyvBp07m2VN4QWnU2WqHDzPk67iRO7NHr3sFyvCpnCcbhun8YA4wN02qL7g9GzjG12/3qDLjwyentynR93ZMy1iYdw1KRobdU8keesNfQlL8t9OvspJqXtg6y1rbDmCvP1OBjKXOC0DgoTLajMhtlaPR9TpqxF1vmqE6N0= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=T9luIVfY DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 398B04BA23F1 Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-38511175ad3so2299519a91.2 for <binutils@sourceware.org>; Sun, 23 Aug 2026 03:45:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787481938; x=1788086738; darn=sourceware.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=3zHqD7Gy+r03gNuD9VwwhQM52St4A4NIdG29FHLccec=; b=T9luIVfYoMj29RuuM4aFQrp+sgPlvjTDptyAxdCOYxpIGv1uS7EOAhkyckI+n8qHNP IFRYdqGepuGib8Cj7E+H2w2mdcqQ5baG/+r9NaiwSyQctC6alldHWajP92CjX1kf/hSZ 2T0d9nmvvR2XZiClRj+xhr475DnrhzbcFbrkqYwWZ8K4hUlH5RDvShdDbchfGLX6kyy5 RtFAR1CtdSZCB2WR3i+VROGpooWoTIQqBIN910sP7q/xht0HvF45tdpEczsoT5JluouB uEWijnzdqcs1KVtdbvlaH2xz3+8V+mEe9HLRG9xWTeJoUtKLg6UbkBm7TLBhYxdstkNr 9J9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787481938; x=1788086738; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=3zHqD7Gy+r03gNuD9VwwhQM52St4A4NIdG29FHLccec=; b=sF/IA7uVYcHim3JSwE7GqjWKNHeN+KzOKO385p77+la4TKbjRzoLR9fKwccaZP177L zLzWDsXMvpfaoNeSSuOBnTVRHdRxq5HDhify0J5PE/GvVL//OJ90Ar3U4cRaJZ2aLlw4 muZ+dT7Wu10Le3QFbSoIYjynLE4GPtL9LfrZM8WFr/mutBqwwbYE50z9sGOB8gexJ7Cw g2A4yGwhmbyS3mNqtPpmpJzCZZRWPSLUVlIHfIkfxK9oOwqgk4SolFNgscv8vOx7KL/J LAf0KFpIGANoAbS/5CF2vxwcZhoXyNQkqO+oAr+2yUsb9rLOnx0L79JpsDSkrSOvKROB wbWw== X-Gm-Message-State: AFuF++knbxki4ljN2uBbm0naMmFKoiZAWBxZbHkF14lcwRoI88m3RM7g vlKrXalSNKNYoMuX5SSI7RgQ7eMDZxlYYjHagKtbzhgct9+u2IrMcmzu X-Gm-Gg: AR+sD107cGrGNdA0reVcANrXxNL2QnAFB8A4g59ISITPKT9036hnvGX3FTZX5WIAPlB fqHwo2Rq+Dqp95zrXP2TWc7kcQ/gMhH/C1jvwTaD5M1/e8U85LRpXW3LNsQH9raM50S2e/t6geQ nElSohVMq7I/TJ/NaP5rso10pnDBPL6NnO2hLNPrnsQK/GE6FF17eYRSDSNzw2Xkw7gEJDZzUiw 4Ar4nOaD1MDNO/dQzTJtfwgcDAlhGQgVDLRbLT8D10z4za/yW1+5edmxN0/Jo7vzoOcav1aWxRW 8rSImDAzUyE7gd+zaPN4BJUqclsefif3EcJk5kzxY6oVLkSJc5VLBkuJV/XallSWhrW02HjuWfu v+NYgYsktdF8lJQem1PozbxJ25lut30XAf1TgSpDUfaaR5YG9aZJc0JRlJ26fqnmDnUre0Bs+JX xQBmjdySWU3j0KTTH9Fm3FRxF817w2UlZmsmZyFJouM6N0lpIjUpDTelB3UZIwh49URnOeJ4MT0 fM4hkAL7t9ni+hQdHAoUi2jx+vQm2JB2HaX9giE X-Received: by 2002:a17:90b:180d:b0:38e:2524:724f with SMTP id 98e67ed59e1d1-395c3733e65mr33123524a91.12.1787481938155; Sun, 23 Aug 2026 03:45:38 -0700 (PDT) Received: from squeak.grove.modra.org (58-96-106-158.ip4.superloop.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-395e4968618sm6552822a91.3.2026.08.23.03.45.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Aug 2026 03:45:37 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id C775511419CF; Sun, 23 Aug 2026 20:15:34 +0930 (ACST) Date: Sun, 23 Aug 2026 20:15:34 +0930 From: Alan Modra <amodra@gmail.com> To: binutils@sourceware.org Cc: Mostafa Essawy <mostafaessawy95@gmail.com> Subject: objcopy --strip-symbols and similar with file arg Message-ID: <aorPTufUC8QEMFzZ@squeak.grove.modra.org> References: <CAD6x3rr1seDDj8972qfPDVpUpOg79LYMmGogC7Zb+fQnn+Yp6Q@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <CAD6x3rr1seDDj8972qfPDVpUpOg79LYMmGogC7Zb+fQnn+Yp6Q@mail.gmail.com> X-Spam-Status: No, score=-3029.6 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 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 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> Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
objcopy --strip-symbols and similar with file arg
|
|
Checks
| Context | Check | Description |
|---|---|---|
| linaro-tcwg-bot/tcwg_binutils_build--master-arm | fail | Patch failed to apply |
| linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 | fail | Patch failed to apply |
Commit Message
Alan Modra
Aug. 23, 2026, 10:45 a.m. UTC
If something like --strip-symbols /dev/urandom is passed to objcopy we get a -1 return from get_file_size which isn't checked. Things go downhill from there. From https://lists.gnu.org/archive/html/bug-binutils/2026-08/msg00083.html * objcopy.c (add_specific_symbols): Fail on negative return from get_file_size.
Comments
> > Hello, > > I’m following up regarding the security vulnerability I reported in GNU > Binutils 2.47 affecting objcopy. > > Thank you for reviewing and addressing the issue. > > I wanted to ask about the next steps in the vulnerability disclosure > process. In particular: > > - Is the issue expected to receive a CVE identifier? > - Is there an expected timeline for the fix/release and public > disclosure? > - Does the Binutils project offer any financial reward or bounty for > responsibly reported security vulnerabilities? > > Thank you again for your time and for looking into the report. > > Best regards, > Mostafa >
On Thu, Aug 27, 2026 at 11:05:06AM +0300, Mostafa Essawy wrote: > > - Is the issue expected to receive a CVE identifier? No. > > - Is there an expected timeline for the fix/release and public > > disclosure? The fix will appear in the next binutils release. The mailing lists are public so the bug is known to anyone who reads them. > > - Does the Binutils project offer any financial reward or bounty for > > responsibly reported security vulnerabilities? Not that I'm aware of.
diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 4ab7e8997b5..609bb311a9a 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -1134,7 +1134,7 @@ add_specific_symbols (const char *filename, htab_t htab, char **buffer_p) unsigned int line_count; size = get_file_size (filename); - if (size == 0) + if (size < 1) { status = 1; return;