linux-yocto/include
Gustavo A. R. Silva 6460b26a28 neighbour: Fix __randomize_layout crash in struct neighbour
Previously, one-element and zero-length arrays were treated as true
flexible arrays, even though they are actually "fake" flex arrays.
The __randomize_layout would leave them untouched at the end of the
struct, similarly to proper C99 flex-array members.

However, this approach changed with commit 1ee60356c2 ("gcc-plugins:
randstruct: Only warn about true flexible arrays"). Now, only C99
flexible-array members will remain untouched at the end of the struct,
while one-element and zero-length arrays will be subject to randomization.

Fix a `__randomize_layout` crash in `struct neighbour` by transforming
zero-length array `primary_key` into a proper C99 flexible-array member.

Fixes: 1ee60356c2 ("gcc-plugins: randstruct: Only warn about true flexible arrays")
Closes: https://lore.kernel.org/linux-hardening/20231124102458.GB1503258@e124191.cambridge.arm.com/
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Joey Gouly <joey.gouly@arm.com>
Link: https://lore.kernel.org/r/ZWJoRsJGnCPdJ3+2@work
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2024-03-12 22:59:50 -04:00
..
acpi ACPI: APEI: Fix AER info corruption when error status data has multiple sections 2023-11-28 17:14:42 +00:00
asm-generic hyperv-fixes for 6.5-rc5 2023-08-04 17:16:14 -07:00
clocksource
crypto crypto: api - Use work queue in crypto_destroy_instance 2023-09-13 09:53:05 +02:00
drm drm: bridge: samsung-dsim: Fix waiting for empty cmd transfer FIFO on older Exynos 2023-11-20 11:56:58 +01:00
dt-bindings dt-bindings: clock: qcom,gcc-sc8280xp: Add missing GDSCs 2023-09-13 09:53:27 +02:00
keys
kunit
kvm
linux This is the 6.5.13 stable release 2023-12-03 17:57:49 -05:00
math-emu
media media: cec: core: add adap_unconfigured() callback 2023-09-13 09:53:40 +02:00
memory
misc
net neighbour: Fix __randomize_layout crash in struct neighbour 2024-03-12 22:59:50 -04:00
pcmcia
ras
rdma
rv
scsi scsi: sd: Introduce manage_shutdown device flag 2023-11-02 09:36:55 +01:00
soc firmware: tegra: Add suspend hook and reset BPMP IPC early on resume 2023-11-20 11:57:06 +01:00
sound ASoC: soc-dai: add flag to mute and unmute stream during trigger 2023-11-28 17:15:06 +00:00
target
trace btrfs: remove v0 extent handling 2023-11-02 09:36:50 +01:00
uapi This is the 6.5.13 stable release 2023-12-03 17:57:49 -05:00
ufs scsi: ufs: Fix residual handling 2023-09-13 09:53:36 +02:00
vdso
video This is the 6.5.13 stable release 2023-12-03 17:57:49 -05:00
xen xen/evtchn: Introduce new IOCTL to bind static evtchn 2023-07-26 08:42:34 +02:00