lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 27 Jan 2023 19:52:14 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Kees Cook <keescook@...omium.org>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Len Brown <lenb@...nel.org>,
        Robert Moore <robert.moore@...el.com>,
        "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-hardening@...r.kernel.org,
        acpica-devel@...ts.linuxfoundation.org
Subject: Re: [PATCH] ACPICA: Replace fake flexible arrays with flexible array members

On Fri, Jan 27, 2023 at 7:33 PM Kees Cook <keescook@...omium.org> wrote:
>
> On Fri, Jan 27, 2023 at 07:08:39PM +0100, Rafael J. Wysocki wrote:
> > On Fri, Jan 20, 2023 at 8:16 PM Kees Cook <keescook@...omium.org> wrote:
> > >
> > > On Fri, Jan 20, 2023 at 07:10:52PM +0100, Rafael J. Wysocki wrote:
> > > > On Sun, Jan 15, 2023 at 7:38 PM Kees Cook <keescook@...omium.org> wrote:
> > > > >
> > > > > On Fri, Nov 18, 2022 at 10:15:51AM -0800, Kees Cook wrote:
> > > > > > Functionally identical to ACPICA upstream pull request 813:
> > > > > > https://github.com/acpica/acpica/pull/813
> > > > >
> > > > > Any update on this? Upstream is currently unbuildable since October.
> > > > >
> > > > > > One-element arrays (and multi-element arrays being treated as
> > > > > > dynamically sized) are deprecated[1] and are being replaced with
> > > > > > flexible array members in support of the ongoing efforts to tighten the
> > > > > > FORTIFY_SOURCE routines on memcpy(), correctly instrument array indexing
> > > > > > with UBSAN_BOUNDS, and to globally enable -fstrict-flex-arrays=3.
> > > > > >
> > > > > > Replace one-element array with flexible-array member in struct
> > > > > > acpi_resource_extended_irq. Replace 4-byte fixed-size array with 4-byte
> > > > > > padding in a union with a flexible-array member in struct
> > > > > > acpi_pci_routing_table.
> > > > > >
> > > > > > This results in no differences in binary output.
> > > > >
> > > > > In the meantime, can you take this patch for Linux, and we can wait for
> > > > > ACPICA to catch up?
> > > >
> > > > Applied now (as 6.3 material), sorry for the delay.
> > >
> > > Thanks!
> >
> > Unfortunately, this breaks compilation for the ACPI tools in tools/power/acpi/.
>
> What's the make target to test this?

Just cd to tools/power/acpi in the kernel tree and run make.

> > Apparently, the problem is that DECLARE_FLEX_ARRAY() is not defined
> > when the tools are built, because kernel headers are not used then.
>
> This should exist in the stddef.h tools headers, but perhaps it isn't
> included already?

No, it isn't AFAICS.

> > I guess the changes from your upstream PR need to be backported
> > literally for this to work, so I'll drop this one for the time being.
> > Or please let me know if you have a better idea.
>
> I can send a new version if I can reproduce the build failure you see...

Sure, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ