Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Richard Earnshaw via Gdb <gdb@sourceware.org>
To: Paul Koning <paulkoning@comcast.net>,
	Siddhesh Poyarekar <siddhesh@gotplt.org>
Cc: Nick Clifton <nickc@redhat.com>,
	Binutils <binutils@sourceware.org>,
	"gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: RFC: Adding a SECURITY.md document to the Binutils
Date: Thu, 13 Apr 2023 17:06:23 +0100	[thread overview]
Message-ID: <54528386-cb90-eb52-e5c8-c659be5217d5@foss.arm.com> (raw)
In-Reply-To: <E76CA0FA-92DC-4AD0-99D1-5A38D3FE749C@comcast.net>



On 13/04/2023 16:08, Paul Koning wrote:
> 
> 
>> On Apr 13, 2023, at 11:02 AM, Siddhesh Poyarekar <siddhesh@gotplt.org> wrote:
>>
>> On 2023-04-13 10:50, Richard Earnshaw wrote:
>>> No, whilst elf can be executed, objdump should never be doing that: it's a tool for examining a file, not running it.  You have to have a tool that can safely examine the contents of an elf file or you can never verify it for issues - opening it up in emacs to examine the contents is not the way to do that :)
>>
>> You can verify it for issues, in a sandbox.
>>
>>> But all that is beside the point.  The original case I gave was a /corrupt/ elf file that caused a buffer overrun in the objdump binary.
>>
>> ... and that's a robustness issue.  Any buffer overrun in any program could in theory be exploited to send out files.
> 
> No.  Buffer overruns are generally recognized as security issues, precisely because they (often) can be used to produce arbitrary code execution exploits.
> 
> A buiffer overrun would be merely a robustness issue if it is guaranteed to cause nothing worse than a program abort.
> 
> 	paul
> 

Thank you Paul, you put that better than I did.

So lets try to come up with a more robust taxonomy...

A script file is a file that contains plain text that might be fully 
viewed in a traditional text editor.

For binutils there are three scenarios:

1) Tools that examine the contents of some non-script files and dump a 
textual representation of their contents (primarily to stdout).

2) Tools that process the contents of files and create new files based 
on them

3) Tools that might try to 'execute' the contents of a non-script file.

Binutils really only has tools in classes 1 and 2.

For scenario one, only files specified on the command line as output 
files should be written to (or otherwise modified).  Script files are 
not processed.  Tools that fit into this category include nm, objdump 
and readelf.

For scenario two, only files specified on the command line or in script 
files as output files should be written to (or otherwise modified). 
Tools here include 'as', 'ar', objcopy, ld.  Temporary files may be 
generated (in a secure manner) as part of the process of doing this.

For scenario three a non-script file might be executed, but I think that 
there are no tools in binutils that need to do this.

Given the above, a security issue would exist in a tool if it could be 
made to violate the constraints on the scenario specified for the tool.

R.

      parent reply	other threads:[~2023-04-13 16:07 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-07  8:42 Nick Clifton via Gdb
2023-04-07 10:36 ` Eli Zaretskii via Gdb
2023-04-11 13:29   ` Nick Clifton via Gdb
2023-04-11 14:23     ` Simon Marchi via Gdb
2023-04-11 15:00       ` Eli Zaretskii via Gdb
2023-04-11 16:22         ` Nick Clifton via Gdb
2023-04-11 16:32           ` Matt Rice via Gdb
2023-04-11 18:18         ` J.W. Jagersma via Gdb
2023-04-12  8:43           ` Nick Clifton via Gdb
2023-04-08  6:30 ` Jan Beulich via Gdb
2023-04-10 18:30 ` John Baldwin
2023-04-20 15:56   ` Nick Clifton via Gdb
2023-04-11 19:45 ` Ian Lance Taylor via Gdb
2023-04-12 16:02 ` Richard Earnshaw via Gdb
2023-04-12 16:26   ` Siddhesh Poyarekar
2023-04-12 16:52     ` Richard Earnshaw via Gdb
2023-04-12 16:58       ` Paul Koning via Gdb
2023-04-12 17:10       ` Siddhesh Poyarekar
2023-04-13  3:51         ` Alan Modra via Gdb
2023-04-13  4:25           ` Siddhesh Poyarekar
2023-04-13  5:16             ` Alan Modra via Gdb
2023-04-13 12:00               ` Siddhesh Poyarekar
2023-04-13 10:25         ` Richard Earnshaw via Gdb
2023-04-13 11:53           ` Siddhesh Poyarekar
2023-04-13 12:37             ` Richard Earnshaw via Gdb
2023-04-13 12:54               ` Siddhesh Poyarekar
2023-04-13 13:11                 ` Richard Earnshaw via Gdb
2023-04-13 13:35                   ` Siddhesh Poyarekar
2023-04-13 13:40                     ` Richard Earnshaw via Gdb
2023-04-13 13:56                       ` Siddhesh Poyarekar
2023-04-13 14:50                         ` Richard Earnshaw via Gdb
2023-04-13 15:02                           ` Siddhesh Poyarekar
2023-04-13 15:05                             ` Richard Earnshaw via Gdb
2023-04-13 16:42                               ` Siddhesh Poyarekar
2023-04-14  9:52                                 ` Richard Earnshaw via Gdb
2023-04-14 12:43                                   ` Siddhesh Poyarekar
2023-04-14 12:49                                     ` Richard Earnshaw via Gdb
2023-04-14 13:13                                       ` Siddhesh Poyarekar
2023-04-13 15:08                             ` Paul Koning via Gdb
2023-04-13 16:02                               ` Siddhesh Poyarekar
2023-04-13 16:49                                 ` Paul Koning via Gdb
2023-04-13 17:00                                   ` Siddhesh Poyarekar
2023-04-13 17:05                                     ` Paul Koning via Gdb
2023-04-13 17:29                                       ` Siddhesh Poyarekar
2023-04-13 17:37                                         ` Paul Koning via Gdb
2023-04-13 18:16                                           ` Siddhesh Poyarekar
2023-04-14 17:37                                     ` Ian Lance Taylor via Gdb
2023-04-14 18:27                                       ` Siddhesh Poyarekar
2023-04-14 20:46                                         ` Ian Lance Taylor via Gdb
2023-04-14 21:24                                           ` Siddhesh Poyarekar
2023-04-17 15:31                                           ` Michael Matz via Gdb
2023-04-17 19:55                                             ` Ian Lance Taylor via Gdb
2023-04-14 19:45                                       ` DJ Delorie via Gdb
2023-04-14 20:49                                         ` Ian Lance Taylor via Gdb
2023-04-15  6:41                                           ` Xi Ruoyao via Gdb
2023-04-13 16:06                               ` Richard Earnshaw via Gdb [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54528386-cb90-eb52-e5c8-c659be5217d5@foss.arm.com \
    --to=gdb@sourceware.org \
    --cc=Richard.Earnshaw@foss.arm.com \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    --cc=paulkoning@comcast.net \
    --cc=siddhesh@gotplt.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox