{"action":"created","issue":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/8248","repository_url":"https://api.github.com/repos/bitcoin/bitcoin","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/8248/labels{/name}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/8248/comments","events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/8248/events","html_url":"https://github.com/bitcoin/bitcoin/issues/8248","id":161938316,"number":8248,"title":"Need to check ASLR is actually happening on Windows","user":{"login":"laanwj","id":126646,"avatar_url":"https://avatars.githubusercontent.com/u/126646?v=3","gravatar_id":"","url":"https://api.github.com/users/laanwj","html_url":"https://github.com/laanwj","followers_url":"https://api.github.com/users/laanwj/followers","following_url":"https://api.github.com/users/laanwj/following{/other_user}","gists_url":"https://api.github.com/users/laanwj/gists{/gist_id}","starred_url":"https://api.github.com/users/laanwj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laanwj/subscriptions","organizations_url":"https://api.github.com/users/laanwj/orgs","repos_url":"https://api.github.com/users/laanwj/repos","events_url":"https://api.github.com/users/laanwj/events{/privacy}","received_events_url":"https://api.github.com/users/laanwj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bitcoin/bitcoin/labels/Windows","name":"Windows","color":"884400"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-06-23T14:34:43Z","updated_at":"2016-06-27T10:03:16Z","closed_at":null,"body":"Had an interesting exchange on twitter today re: Windows security: https://twitter.com/CopperheadOS/status/745962747117076480\r\n\r\nSeems that `dynamicbase` is not enough and:\r\n- Something called `highentropyva` is necessary for (secure) ASLR on 64-bit.\r\n- Standard link/build flags of mingw-w64 prevent ASLR from actually being used, due to lack of an executable relocation table.\r\n- Rust worked around some mingw-w64 ASLR bugs here https://github.com/rust-lang/rust/commit/96f5eba4f5603c612464d6b1e961677e9d7084d3 and https://github.com/rust-lang/rust/issues/17684 (ASLR on Windows breaks thread-local variables)\r\n\r\nAt the least it should be verified using a debugger or something like sysinternals that the base address changes every invocation."},"comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments/228704372","html_url":"https://github.com/bitcoin/bitcoin/issues/8248#issuecomment-228704372","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/8248","id":228704372,"user":{"login":"laanwj","id":126646,"avatar_url":"https://avatars.githubusercontent.com/u/126646?v=3","gravatar_id":"","url":"https://api.github.com/users/laanwj","html_url":"https://github.com/laanwj","followers_url":"https://api.github.com/users/laanwj/followers","following_url":"https://api.github.com/users/laanwj/following{/other_user}","gists_url":"https://api.github.com/users/laanwj/gists{/gist_id}","starred_url":"https://api.github.com/users/laanwj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laanwj/subscriptions","organizations_url":"https://api.github.com/users/laanwj/orgs","repos_url":"https://api.github.com/users/laanwj/repos","events_url":"https://api.github.com/users/laanwj/events{/privacy}","received_events_url":"https://api.github.com/users/laanwj/received_events","type":"User","site_admin":false},"created_at":"2016-06-27T10:03:16Z","updated_at":"2016-06-27T10:03:16Z","body":"> You can easily check whether an executable has ASLR enabled by doing dumpbin /headers foo.exe where dumpbin is a program that comes with MSVC. Ideally you should see something like the following in the output:\r\n\r\nThat just checks the header bits (the same as your security check script already does using `objdump`). It does not actually check whether the address space is randomized in practice, which I did by checking the memory maps at runtime.\r\n\r\n> If only you could use msvc to compile the code, then you'd have all that by default.\r\n\r\nYou can use MSVC to compile the code. There's nothing about the code that should be gcc+clang specific (and if it is, that should be fixed).\r\n\r\nHowever that doesn't help for releases as they need to be able to be built from source deterministically (with gitian). Using a closed source, not freely redistributable compiler is out of the question for that.\r\n"}}
{"actor":{"display_login":"laanwj"}}