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] [thread-next>] [day] [month] [year] [list]
Message-ID: <66C64DB0-94A2-47E8-932C-519544C5FE90@kernel.org>
Date:   Mon, 13 Feb 2023 11:51:59 -0800
From:   Kees Cook <kees@...nel.org>
To:     Guenter Roeck <linux@...ck-us.net>,
        Kees Cook <keescook@...omium.org>
CC:     "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Len Brown <lenb@...nel.org>,
        Robert Moore <robert.moore@...el.com>,
        linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
        devel@...ica.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH v2] ACPICA: Replace fake flexible arrays with flexible array members

On February 12, 2023 4:35:46 PM PST, Guenter Roeck <linux@...ck-us.net> wrote:
>Hi,
>
>On Fri, Jan 27, 2023 at 11:16:25AM -0800, Kees Cook wrote:
>> 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.
>> 
>> Link: https://github.com/acpica/acpica/pull/813
>> Signed-off-by: Kees Cook <keescook@...omium.org>
>> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
>
>This patch results in boot failures of 32-bit images.

Weird -- I didn't see any binary differences. I'll investigate. What compiler and arch?

-Kees

>Reverting it fixes the problem.
>
>On the failing boot tests, I see messages such as
>
>ACPI: \_SB_.GSIA: Enabled at IRQ 117440528
>ERROR: Unable to locate IOAPIC for GSI 117440528
>ahci 0000:00:1f.2: PCI INT A: failed to register GSI
>
>ACPI: \_SB_.GSIG: Enabled at IRQ 117440534
>ERROR: Unable to locate IOAPIC for GSI 117440534
>8139cp 0000:00:02.0: PCI INT A: failed to register GSI
>
>Given that 117440534 == 0x7000016, that looks quite suspicious.
>Indeed, after reverting this patch, the messages are different.

Yeah, seems like a high byte not getting cleared. Hmm.

>
>ACPI: \_SB_.GSIA: Enabled at IRQ 16
>ahci 0000:00:1f.2: AHCI 0001.0000 32 slots 6 ports 1.5 Gbps 0x3f impl SATA mode
>
>ACPI: \_SB_.GSIG: Enabled at IRQ 22
>8139cp 0000:00:02.0 eth0: RTL-8139C+ at 0xd0804000, 52:54:00:12:34:56, IRQ 22
>
>Guenter


-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ