[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 23/23] configure: Prohibit variable-length allocations by using -
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 23/23] configure: Prohibit variable-length allocations by using -Wvla CPPFLAG |
Date: |
Wed, 5 May 2021 23:10:47 +0200 |
Now that we converted all variable-length allocations in the
repository, add the -Wvla CPPFLAG to trigger a build failure
if such allocation is used.
This should help avoiding vulnerabilities such CVE-2021-3527
(see commit range 3f67e2e7f13..05a40b172e4).
Inspired-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index 4f374b48890..a78ff15b52f 100755
--- a/configure
+++ b/configure
@@ -552,7 +552,7 @@ ARFLAGS="${ARFLAGS-rv}"
# provides these semantics.)
QEMU_CFLAGS="-fno-strict-aliasing -fno-common -fwrapv $QEMU_CFLAGS"
QEMU_CFLAGS="-Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
-QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
+QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls -Wvla $QEMU_CFLAGS"
QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
$QEMU_CFLAGS"
# Flags that are needed during configure but later taken care of by Meson
--
2.26.3
- Re: [PATCH 15/23] net: Avoid dynamic stack allocation, (continued)
- [PATCH 17/23] ui/spice-display: Avoid dynamic stack allocation, Philippe Mathieu-Daudé, 2021/05/05
- [PATCH 18/23] ui/vnc-enc-hextile: Use definitions to avoid dynamic stack allocation, Philippe Mathieu-Daudé, 2021/05/05
- [PATCH 19/23] ui/vnc-enc-tight: Avoid dynamic stack allocation, Philippe Mathieu-Daudé, 2021/05/05
- [PATCH 20/23] util/iov: Avoid dynamic stack allocation, Philippe Mathieu-Daudé, 2021/05/05
- [PATCH 21/23] target/ppc/kvm: Avoid dynamic stack allocation, Philippe Mathieu-Daudé, 2021/05/05
- [PATCH 22/23] tests/unit/test-vmstate: Avoid dynamic stack allocation, Philippe Mathieu-Daudé, 2021/05/05
- [PATCH 23/23] configure: Prohibit variable-length allocations by using -Wvla CPPFLAG,
Philippe Mathieu-Daudé <=