public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Orlando Arias <orlandoarias@gmail.com>
To: Michael Matz <matz@suse.de>
Cc: binutils@sourceware.org
Subject: Re: Remove dependency on libjansson
Date: Wed, 3 Apr 2024 11:37:32 -0400	[thread overview]
Message-ID: <e448479d-0d96-44e3-9563-a13bce16c7dc@gmail.com> (raw)
In-Reply-To: <c5f0d81f-0447-e9f3-7d75-426ee258179d@suse.de>


[-- Attachment #1.1: Type: text/plain, Size: 1171 bytes --]

Greetings,

On 4/3/24 10:58 AM, Michael Matz wrote:
> Indeed.  But note that you're saying something else than what you wanted
> to say :)  For ld the input here is "blob of bytes".  That it's actually
> JSON (or claims to be!) is a matter for the processor of these .note
> sections.  _Those_ need to check the contents of them for being proper
> JSON themself.  They cannot rely on ld having produced "correct" .note
> sections anyway.  They could have been produced by bad tools, or
> retroactively be mangled.
> 
> So, as such checking in the consumer tools for the .notes cannot be
> avoided the early checking at producer time is a bit wasteful, and from a
> security perspective achieves exactly nothing.

Apologies for the confusion. Yes, I wholly agree, checking must be done 
at every stage of the chain. That includes both generation and every 
stage of the way thereafter. The entire chain must be sanitized. As you 
mention, tampering along the way is a possibility. Also, it is very 
possible that different parsers treat the same construct in different 
ways. This goes back to the entire weird machine situation.

Cheers,
Orlando.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 756 bytes --]

      reply	other threads:[~2024-04-03 15:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-01  3:31 Rui Ueyama
2024-04-01  7:28 ` Fangrui Song
2024-04-01  9:39   ` Sam James
2024-04-01 10:38     ` Luca Boccassi
2024-04-01 10:44       ` Sam James
2024-04-01 11:44       ` Rui Ueyama
2024-04-01 12:16         ` Luca Boccassi
2024-04-01 13:23           ` Rui Ueyama
2024-04-02  0:54             ` Luca Boccassi
2024-04-02  9:40               ` Rui Ueyama
2024-04-02 13:10                 ` Orlando Arias
2024-04-03 14:58                   ` Michael Matz
2024-04-03 15:37                     ` Orlando Arias [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=e448479d-0d96-44e3-9563-a13bce16c7dc@gmail.com \
    --to=orlandoarias@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=matz@suse.de \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).