Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Jielun Wu <firmiana402@gmail.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH][PR gdb/34239][PR gdb/34299] gdb: Check bounds before reading DWARF expression operands
Date: Thu, 25 Jun 2026 11:23:51 -0400	[thread overview]
Message-ID: <4cca4550-44a8-45e2-9229-2aad030f1bc0@simark.ca> (raw)
In-Reply-To: <20260618180158.2893540-1-firmiana402@gmail.com>



On 2026-06-18 14:01, Jielun Wu wrote:
> Some DWARF expression opcodes read fixed-width operands or block payloads
> from the expression buffer before checking that the bytes are available.
> With a malformed expression, this can read past the end of the expression
> buffer.
> 
> Add helpers that validate fixed-width integer reads and block payload
> skips, and use them in dwarf_expr_context::execute_stack_op.  Also guard
> the nested DW_OP_entry_value parser before reading the following opcode.
> 
> Add a DWARF assembler test that exercises truncated operands for these
> opcodes.
> 
> Tested on x86_64-linux.
> 
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34239
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34299

I'll look at this patch, but before anything else, do you have a
copyright assignment on file with the FSF?  This is required in order to
submit a non-trivial amount of code to GDB.  See here for details:

https://sourceware.org/gdb/wiki/ContributionChecklist#FSF_copyright_Assignment

Simon

  parent reply	other threads:[~2026-06-25 15:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-18 18:01 Jielun Wu
2026-06-23 18:56 ` Guinevere Larsen
2026-06-26  8:31   ` Firmiana
2026-06-26 14:30     ` Simon Marchi
2026-06-25 15:23 ` Simon Marchi [this message]
2026-06-25 16:36 ` Simon Marchi
2026-06-26  7:34   ` Firmiana
2026-06-26 14:23     ` Simon Marchi

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=4cca4550-44a8-45e2-9229-2aad030f1bc0@simark.ca \
    --to=simark@simark.ca \
    --cc=firmiana402@gmail.com \
    --cc=gdb-patches@sourceware.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