Skip to content

Commit 5979c1b

Browse files
committed
Build libgraal with 'Full RELRO' to prevent GOT overwriting exploits
1 parent 8406926 commit 5979c1b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

substratevm/mx.substratevm/mx_substratevm.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,6 +1213,9 @@ def _native_image_launcher_extra_jvm_args():
12131213

12141214
# URLClassLoader causes considerable increase of the libgraal image size and should be excluded.
12151215
'-H:ReportAnalysisForbiddenType=java.net.URLClassLoader',
1216+
1217+
# build libgraal with 'Full RELRO' to prevent GOT overwriting exploits (GR-46838)
1218+
'-H:NativeLinkerOption=-Wl,-z,relro,-z,now',
12161219
] + ([
12171220
# Force page size to support libgraal on AArch64 machines with a page size up to 64K.
12181221
'-H:PageSize=64K'

0 commit comments

Comments
 (0)