GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Unverified Commit 4c8fa54b authored by boklm's avatar boklm
Browse files

Add a win_DEP_ASLR test on Windows

Add a test to check for DEP/ASLR in executable files included in the
Windows bundle.
parent 68096a1a
......@@ -42,6 +42,48 @@ sub description {
}
our @tests = (
{
name => 'win_DEP_ASLR',
type => 'command',
retry => 1,
descr => 'Check DEP/ASLR',
files => \&tbb_binfiles,
command => [ "$FindBin::Bin/data/check-windows-dep-aslr.sh" ],
enable => sub { $_[0]->{os} eq 'Windows' },
# ticket 16417
skip_files => [ qw(
TorBrowser/Tor/PluggableTransports/_ctypes.pyd
TorBrowser/Tor/PluggableTransports/_hashlib.pyd
TorBrowser/Tor/PluggableTransports/_socket.pyd
TorBrowser/Tor/PluggableTransports/_ssl.pyd
TorBrowser/Tor/PluggableTransports/bz2.pyd
TorBrowser/Tor/PluggableTransports/Crypto.Cipher._AES.pyd
TorBrowser/Tor/PluggableTransports/Crypto.Hash._SHA256.pyd
TorBrowser/Tor/PluggableTransports/Crypto.Hash._SHA512.pyd
TorBrowser/Tor/PluggableTransports/Crypto.Random.OSRNG.winrandom.pyd
TorBrowser/Tor/PluggableTransports/Crypto.Util._counter.pyd
TorBrowser/Tor/PluggableTransports/Crypto.Util.strxor.pyd
TorBrowser/Tor/PluggableTransports/flashproxy-client.exe
TorBrowser/Tor/PluggableTransports/flashproxy-reg-appspot.exe
TorBrowser/Tor/PluggableTransports/flashproxy-reg-email.exe
TorBrowser/Tor/PluggableTransports/flashproxy-reg-http.exe
TorBrowser/Tor/PluggableTransports/flashproxy-reg-url.exe
TorBrowser/Tor/PluggableTransports/fte.cDFA.pyd
TorBrowser/Tor/PluggableTransports/fteproxy.exe
TorBrowser/Tor/PluggableTransports/M2Crypto.__m2crypto.pyd
TorBrowser/Tor/PluggableTransports/meek-client-torbrowser.exe
TorBrowser/Tor/PluggableTransports/meek-client.exe
TorBrowser/Tor/PluggableTransports/obfs4proxy.exe
TorBrowser/Tor/PluggableTransports/obfsproxy.exe
TorBrowser/Tor/PluggableTransports/pyexpat.pyd
TorBrowser/Tor/PluggableTransports/python27.dll
TorBrowser/Tor/PluggableTransports/select.pyd
TorBrowser/Tor/PluggableTransports/terminateprocess-buffer.exe
TorBrowser/Tor/PluggableTransports/unicodedata.pyd
TorBrowser/Tor/PluggableTransports/w9xpopen.exe
TorBrowser/Tor/PluggableTransports/zope.interface._zope_interface_coptimizations.pyd
) ],
},
{
name => 'readelf_RELRO',
fail_type => 'warning',
......
#!/bin/bash
set -e
function abs_dir() {
(cd "$1" && echo "$(pwd)")
}
bdir="$(abs_dir ${BASH_SOURCE%/*})"
script="$bdir/check-windows-dep-aslr"
file="$1"
if [ $(uname.exe -o) = 'Cygwin' ]
then
script=$(cygpath -aw "$script")
file=$(cygpath -aw "$file")
fi
exec "$bdir/../virtualenv-pefile/Scripts/python.exe" "$script" "$file"
......@@ -13,6 +13,7 @@ sub winpath {
}
my $virtenv_marionette_dir = winpath("$FindBin::Bin/virtualenv-marionette");
my $virtenv_pefile_dir = winpath("$FindBin::Bin/virtualenv-pefile");
sub run {
system(@_) == 0 || die "Error running " . join(' ', @_);
......@@ -39,3 +40,10 @@ unless (-d $virtenv_marionette_dir) {
run($virtualenv_cmd, $virtenv_marionette_dir);
run_from_dir('marionette', "$virtenv_marionette_dir/$bin/python", 'setup.py', 'develop');
}
if ($OSNAME eq 'cygwin') {
unless (-d $virtenv_pefile_dir) {
run($virtualenv_cmd, $virtenv_pefile_dir);
run("$virtenv_pefile_dir/$bin/pip", 'install', 'pefile');
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment