mirror of https://github.com/nodejs/node.git
freebsd,linux,sunos: make stack non-executable
Link with -z,noexecstack to make stack memory non-executable. Makes shellcode injection through buffer overflows more difficult. Fixes: https://github.com/joyent/node/issues/7542 PR-URL: https://github.com/node-forward/node/pull/8 Reviewed-By: Trevor Norris <trevnorris@gmail.com>pull/1158/head
parent
6d2ac2bd54
commit
4fae2356d1
6
node.gyp
6
node.gyp
|
@ -365,6 +365,12 @@
|
||||||
'PLATFORM="sunos"',
|
'PLATFORM="sunos"',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
|
[ 'OS=="freebsd" or OS=="linux"', {
|
||||||
|
'ldflags': [ '-Wl,-z,noexecstack' ],
|
||||||
|
}],
|
||||||
|
[ 'OS=="sunos"', {
|
||||||
|
'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ],
|
||||||
|
}],
|
||||||
[
|
[
|
||||||
'OS in "linux freebsd" and node_shared_v8=="false"', {
|
'OS in "linux freebsd" and node_shared_v8=="false"', {
|
||||||
'ldflags': [
|
'ldflags': [
|
||||||
|
|
Loading…
Reference in New Issue