From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 4S0aOuc00mqVCRsAWB0awg (envelope-from ) for ; Fri, 16 Oct 2026 10:29:59 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=jR7+pqgh; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D70CA1E04E; Fri, 16 Oct 2026 10:29:59 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id F340F1E04E for ; Fri, 16 Oct 2026 10:29:58 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E79764BA2E2A for ; Fri, 16 Oct 2026 14:29:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E79764BA2E2A Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=jR7+pqgh Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id D4D9F4BA2E26 for ; Fri, 16 Oct 2026 14:27:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D4D9F4BA2E26 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D4D9F4BA2E26 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792160859; cv=none; b=LZMO2vbSCGfXo+eFRqktbmv+bVmLlbKhJUSGJ5u/l/hUDp67h33WenCJ6xsgYPXtYAQDao/apEWzR6+zf8PXrRR2senudziIvZNjX+12FmoyQy9jRIfzupZjy/J+6g1ykAx5QkhdAou8/dKEbtvIfyMBYV9T1OgNMGtxm1YrOYQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792160859; c=relaxed/simple; bh=B2mcoZ3OtsIda5ArxTzWpnenCbjV2PYkB1BhKl7N7vE=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=lionBpt5U4C4EszRQGBTbn83XSfqutcirGNcDHmgMaNjuHBAFaEvJtHBslCL3vEqX3BOUpZfArlb5pEjynhf26LvkU7Ci6MqFkMDqVfm+UOVu8amTPBZHs5zUT4AZp7BdnFJY90ZxsDKmp60oL8MYsfRpoUCn8mBWq//xJwtd5M= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=jR7+pqgh DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D4D9F4BA2E26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792160859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qH2ZakIB+B8Ud4PrEqC5UlYrE8A92qOwtftmYc3a6o8=; b=jR7+pqghFaSbYOkMkUkzGgZ38zaIuLLK0IMY4K/K8fevP4KWDSK+iOceoyE8Be/L4pAa2E ZeteQstBiS/m12Plgm5cdaxE8PYbjGejmkPd1w7qDgiYTrNHcLeYFqMGV0fEe361RzuoM/ 7iaYVEERFqs/0p3+pWy5Q3baZ/SUvJI= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-263-oxrrweL4NnyzMRVDHiVNPQ-1; Fri, 16 Oct 2026 14:27:38 +0000 X-MC-Unique: oxrrweL4NnyzMRVDHiVNPQ-1 X-Mimecast-MFC-AGG-ID: oxrrweL4NnyzMRVDHiVNPQ_1792160857 Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-3ab16700245so4405691fa.3 for ; Fri, 16 Oct 2026 07:27:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792160856; x=1792765656; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=qH2ZakIB+B8Ud4PrEqC5UlYrE8A92qOwtftmYc3a6o8=; b=bhzUqsWgxjoKd/z2V5G4+mOAQQTayvJDaWfngWeDzseqyXpLTM6aEaTG3fHj3D7nPx 3kbp1DDZ6LSKJNUsba1t7Hq6qvIUZRPJ99cKECAhY073KtKpMKBnF1hDF0/l+mxhPr/+ UZeh3PXQuWDS0IEQJvPjzlMVmPM/nGMTqp8rHKZVNTq+ouk4JOe9OEP+ecoFGuocMlti LM3e9rwd73Ytp/HXTiaPQYEeO5TtXUVe0Oa+DX43DP6rkoCytAu0NkyRV8+7yMNDVbgV lKxtz11VBjxMaMhtDXgG0d0yF9IVi58SUMuta3082hnKxzOBLE8cyjz0lNqMFn5ny1rS 3M3A== X-Gm-Message-State: AFq9FYJoJUvrR7mPCKBwAs9Z4nT6nfuJdh18yGQdq8EUfKkJtzIyLmDV AONRWfPvzc4xXb/I1VlPg4HIDEbFV2H5u3r+Xz9nLUma7GXW98Rx/KkcQe3WXCzsAEFVIwdBy/q 8m4rHbeYaXuqtjggYiztOHwKDvO93JI9yvuVWDn5tdLi3N3t7ARZsr/4t7EkA5xQ= X-Gm-Gg: AYBFou2ecMqPhFX8pzFEUXL30XVSWeAZKKBXPbCLpNO6mCmvZk1ldnFVz07uk4EC6ZL XxlMBtefx67CQL/PB/AFX0n0TNEbYQvUqy3zaR9bMIFp24wr7HNnKra9ldFIJF0bsAGpZAMUvMX ck+P9MebdqLpBb2trrg1PmwfQgpDxPWB4cqRQbJsphMsLXLSgcNCdif7fag1HB/p1mdrUUTEqyr eZ77aKosvcgMTu2hMQLo8+2MRgHDOFdPjL9E97JVrNxvoPZtkUqPONBRwa+N/g2KAzO0EoGH7GU fPgUgJrN2plkRMsvBM3lCccQnEaG6OYWfLCdaTuChnMVd+nOyoI+i9NpC8f8ppyWUlBAqVFF+W3 6vw== X-Received: by 2002:a05:6512:3090:b0:5be:4f62:5b64 with SMTP id 2adb3069b0e04-5be4f625e7cmr90028e87.25.1792160856471; Fri, 16 Oct 2026 07:27:36 -0700 (PDT) X-Received: by 2002:a05:6512:3090:b0:5be:4f62:5b64 with SMTP id 2adb3069b0e04-5be4f625e7cmr90012e87.25.1792160855890; Fri, 16 Oct 2026 07:27:35 -0700 (PDT) Received: from [192.168.42.182] ([38.74.41.78]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5be4a42aa05sm436412e87.29.2026.10.16.07.27.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Oct 2026 07:27:34 -0700 (PDT) Message-ID: <6248c8e1-8402-4eb8-bb3b-c6a796eb1f67@redhat.com> Date: Fri, 16 Oct 2026 10:27:30 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/5] gdb: extend SECURITY.txt to highlight additional remote debugging risks To: Andrew Burgess , Tom Tromey Cc: gdb-patches@sourceware.org References: <4a6d4fbc0037fcff1e4e5efc940aab03eb9e57f8.1791812758.git.aburgess@redhat.com> <87jynk48wz.fsf@tromey.com> <87qzhp9100.fsf@redhat.com> From: Siddhesh Poyarekar In-Reply-To: <87qzhp9100.fsf@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ujLxBicc-n6gtWxjGdoW5pQvSjSBZamdGhM6MMReaV8_1792160857 X-Mimecast-Originator: redhat.com Content-Language: en-US, en-CA, en-GB, en-IN Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 10/16/26 10:24 AM, Andrew Burgess wrote: > commit 2879d94ad12bae33908f1fc967c79f59ee97919a > Author: Andrew Burgess > Date: Mon Oct 5 14:14:05 2026 +0100 > > gdb: extend SECURITY.txt to highlight additional remote debugging risks > > I had cause to re-read the SECURITY.txt document recently, and I felt > that it wasn't really clear on one aspect of using GDB with gdbserver > (or any remote target). > > I felt that the text wasn't explicit enough about how a remote target > can download executables and libraries to GDB, and how GDB can then > parse these files. When we consider the sort of bugs we see, > especially in BFD and the DWARF parser, when it comes to badly > formatted files, I thought it was worth calling this out. > > diff --git a/gdb/SECURITY.txt b/gdb/SECURITY.txt > index f4ddebe3f03..64d68f88b84 100644 > --- a/gdb/SECURITY.txt > +++ b/gdb/SECURITY.txt > @@ -210,6 +210,28 @@ Security Realities Of The GDB Project > user to protect this connection, for example, by only starting > gdbserver within a secure network. > > + Additionally, when GDB connects to a remote target, it will, by > + default, automatically download the executable and shared libraries > + from the remote system and parse them locally, without prompting the > + user. This means that the risks described above relating to parsing > + malformed executables also apply when performing remote debugging. > + > + If the remote target is untrusted, or the connection to the remote > + target is untrusted, malicious or malformed binaries could be served > + to GDB, resulting in any of the issues described above. Any bugs in > + GDB triggered by such files are evaluated against the definitions in > + this document independently of how the files were obtained. > + > + Any bug related to remote debugging, whether the remote connection > + or target is trusted or not, is a security bug if the bug meets the > + other definitions in this document. If an untrusted remote target, > + or use of an untrusted connection makes use of a documented GDB > + behaviour, then this is not a security bug in GDB. That closes the gap, thanks. Sid > + > + Users should apply the same precautions when performing remote > + debugging as when analysing an untrusted binary locally, including > + running GDB in a secure, sandboxed environment. > + > Reporting Non-Security Bugs > --------------------------- >