From 191219da06550b90add7013fbf2f944de37e0396 Mon Sep 17 00:00:00 2001 From: Zhiqiang Liu Date: Mon, 13 Sep 2021 21:40:45 +0800 Subject: [PATCH] spdk: use -fstack-protector-strong instead of -fstack-protector for stronger security. Signed-off-by: Zhiqiang Liu (cherry picked from commit 76b60ec6b3642f93b3879419d232002f5d9285f9) --- ...protector-strong-instead-of-fstack-p.patch | 30 +++++++++++++++++++ spdk.spec | 7 ++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 0029-spdk-use-fstack-protector-strong-instead-of-fstack-p.patch diff --git a/0029-spdk-use-fstack-protector-strong-instead-of-fstack-p.patch b/0029-spdk-use-fstack-protector-strong-instead-of-fstack-p.patch new file mode 100644 index 0000000..d00dff6 --- /dev/null +++ b/0029-spdk-use-fstack-protector-strong-instead-of-fstack-p.patch @@ -0,0 +1,30 @@ +From b1959244d8178975119606e9fc1323dbee06c18f Mon Sep 17 00:00:00 2001 +From: Zhiqiang Liu +Date: Mon, 13 Sep 2021 21:36:51 +0800 +Subject: [PATCH] spdk: use -fstack-protector-strong instead of + -fstack-protector + +use -fstack-protector-strong instead of -fstack-protector for +stronger security. + +Signed-off-by: Zhiqiang Liu +--- + mk/spdk.common.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mk/spdk.common.mk b/mk/spdk.common.mk +index f3fe5c2..dc8ed69 100644 +--- a/mk/spdk.common.mk ++++ b/mk/spdk.common.mk +@@ -120,7 +120,7 @@ COMMON_CFLAGS += -D_GNU_SOURCE + COMMON_CFLAGS += -fPIC + + # Enable stack buffer overflow checking +-COMMON_CFLAGS += -fstack-protector ++COMMON_CFLAGS += -fstack-protector-strong + + # Prevent accidental multiple definitions of global variables + COMMON_CFLAGS += -fno-common +-- +1.8.3.1 + diff --git a/spdk.spec b/spdk.spec index 98fcbd4..5add438 100644 --- a/spdk.spec +++ b/spdk.spec @@ -3,7 +3,7 @@ Name: spdk Version: 21.01 -Release: 4 +Release: 5 Summary: Set of libraries and utilities for high performance user-mode storage License: BSD and MIT URL: http://spdk.io @@ -36,6 +36,7 @@ Patch25: 0025-nvmf-fix-fd-leakage-problem-in-nvmf_vfio_user_listen.patch Patch26: 0026-posix-set-fd-to-1-after-close-fd-in-posix_sock_creat.patch Patch27: 0027-spdk_top-check-return-value-of-strdup-in-store_last_.patch Patch28: 0028-uring-set-fd-to-1-after-close-fd-in-uring_sock_creat.patch +Patch29: 0029-spdk-use-fstack-protector-strong-instead-of-fstack-p.patch %define package_version %{version}-%{release} @@ -196,6 +197,10 @@ mv doc/output/html/ %{install_docdir} %changelog +* Mon Sep 13 2021 Zhiqiang Liu - 21.01-5 +- use -fstack-protector-strong instead of -fstack-protector for +stronger security. + * Sat Jul 24 2021 Zhiqiang Liu - 21.01-4 - backport 13 bugfix from upstream -- Gitee