add secure compile option -fstack-protector-strong
(cherry picked from commit 64503078c531631613acace543aef3ce48c0c681)
This commit is contained in:
parent
2957380ed3
commit
c6e98a75a8
21
0001-luajit-add-secure-compile-option-fstack.patch
Normal file
21
0001-luajit-add-secure-compile-option-fstack.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff -Nur LuaJIT-2.1.0-beta3/src/Makefile LuaJIT-2.1.0-beta3-new/src/Makefile
|
||||
--- LuaJIT-2.1.0-beta3/src/Makefile 2017-05-02 03:05:00.000000000 +0800
|
||||
+++ LuaJIT-2.1.0-beta3-new/src/Makefile 2021-05-25 17:24:07.075839335 +0800
|
||||
@@ -217,7 +217,7 @@
|
||||
TARGET_DYLIBNAME= libluajit-$(ABIVER).$(MAJVER).dylib
|
||||
TARGET_DYLIBPATH= $(TARGET_LIBPATH)/$(TARGET_DYLIBNAME)
|
||||
TARGET_DLLNAME= lua$(NODOTABIVER).dll
|
||||
-TARGET_XSHLDFLAGS= -shared -fPIC -Wl,-soname,$(TARGET_SONAME)
|
||||
+TARGET_XSHLDFLAGS= -shared -fstack-protector-strong -fPIC -Wl,-soname,$(TARGET_SONAME)
|
||||
TARGET_DYNXLDOPTS=
|
||||
|
||||
TARGET_LFSFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
|
||||
@@ -309,7 +309,7 @@
|
||||
TARGET_DYNXLDOPTS=
|
||||
else
|
||||
ifeq (,$(shell $(TARGET_CC) -o /dev/null -c -x c /dev/null -fno-stack-protector 2>/dev/null || echo 1))
|
||||
- TARGET_XCFLAGS+= -fno-stack-protector
|
||||
+ TARGET_XCFLAGS+=
|
||||
endif
|
||||
ifeq (Darwin,$(TARGET_SYS))
|
||||
ifeq (,$(MACOSX_DEPLOYMENT_TARGET))
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
Name: luajit
|
||||
Version: 2.1.0
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: Just-In-Time Compiler for Lua
|
||||
License: MIT
|
||||
URL: http://luajit.org/
|
||||
@ -10,6 +10,7 @@ Source0: http://luajit.org/download/LuaJIT-2.1.0-beta3.tar.gz
|
||||
Patch0: CVE-2020-15890.patch
|
||||
Patch1: CVE-2020-24372-1.patch
|
||||
Patch2: CVE-2020-24372-2.patch
|
||||
Patch3: 0001-luajit-add-secure-compile-option-fstack.patch
|
||||
|
||||
ExclusiveArch: %{arm} %{ix86} x86_64 %{mips} aarch64
|
||||
|
||||
@ -75,6 +76,9 @@ ln -s luajit-2.1.0-beta3 %{buildroot}%{_bindir}/luajit
|
||||
%{_mandir}/man1/%{name}.1*
|
||||
|
||||
%changelog
|
||||
* Sat Aug 20 2022 wangkai <wangkai385@h-partners.com> - 2.1.0-4
|
||||
- add secure compile option -fstack-protector-strong
|
||||
|
||||
* Wed Jun 30 2021 liuyumeng <liuyumeng5@huawei.com> - 2.1.0-3
|
||||
- add BuildRequires: gcc
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user