From: Andrew Donnellan <ajd@linux.ibm.com>
To: Nathan Lynch <nathanl@linux.ibm.com>, linuxppc-dev@lists.ozlabs.org
Cc: Leonardo Bras <leobras.c@gmail.com>, linux-hardening@vger.kernel.org
Subject: Re: [PATCH] powerpc/rtas: Replace one-element arrays with flexible arrays
Date: Thu, 20 Apr 2023 17:46:44 +1000 [thread overview]
Message-ID: <03751d6651e65f848bfd7e574b53932a794f2f2a.camel@linux.ibm.com> (raw)
In-Reply-To: <87357wp1h7.fsf@linux.ibm.com>
On Fri, 2023-01-27 at 07:10 -0600, Nathan Lynch wrote:
> > > > I see at least one place that consults the size of one of these
> > > > structs,
> > > > in get_pseries_errorlog():
> > > >
> > > > /* Check that we understand the format */
> > > > if (ext_log_length < sizeof(struct
> > > > rtas_ext_event_log_v6)
> > > > ||
> > > > ...
> > > >
> > > > Don't all such sites need to be audited/adjusted for changes
> > > > like
> > > > this?
I did actually see that site, and concluded that for the purposes of
that particular check, removing a single extra byte is irrelevant
(maybe it makes the check more strictly correct, what if the vendor_log
is actually of length 0?)
Doing a binary diff, as Kees suggests, over the object files in
arch/powerpc:
- there's no difference at all caused by changing
rtas_ext_event_log_v6.vendor_log, which kind of surprises me given the
above.
- changing rtas_error_log.buffer does seem to change some code
generation in arch/powerpc/platforms/pseries/ras.o, I can't quite see
why.
Andrew
--
Andrew Donnellan OzLabs, ADL Canberra
ajd@linux.ibm.com IBM Australia Limited
prev parent reply other threads:[~2023-04-20 7:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-27 8:50 [PATCH] powerpc/rtas: Replace one-element arrays with flexible arrays Andrew Donnellan
2023-01-27 8:59 ` Leonardo Brás
2023-01-27 13:10 ` Nathan Lynch
2023-01-27 19:23 ` Kees Cook
2023-04-20 7:46 ` Andrew Donnellan [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=03751d6651e65f848bfd7e574b53932a794f2f2a.camel@linux.ibm.com \
--to=ajd@linux.ibm.com \
--cc=leobras.c@gmail.com \
--cc=linux-hardening@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nathanl@linux.ibm.com \
/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