Commit graph

21 commits

Author SHA1 Message Date
Awn Umar
3eeb430f92
Merge branch master into development 2019-05-30 06:02:03 +01:00
Awn Umar
8265a2536d
crypto: use local custom emtropy pool 2019-05-13 17:08:37 +01:00
Awn Umar
cedf76e71c
Implement more of the test suite 2019-05-11 18:50:49 +01:00
Awn Umar
3546eefb38
freebsd: use madv_nocore (#82) 2019-05-11 02:00:45 +01:00
Awn Umar
d95e338cc6
patch: remove unavailable flag on freebsd; fixes #82 2019-05-11 01:57:21 +01:00
Awn Umar
de39e5ffa2
openbsd: exclude mapped pages from core dumps 2019-05-02 21:04:23 +01:00
Awn Umar
7dea5a7aae patch: fix logical errors in memcall package 2019-02-24 19:57:50 +00:00
Awn Umar
fbef9a3b39 Rewrite and refactor. Core functionality moved to submodule. Many fixes and improvements. Todo: re-write frontend 2019-02-24 19:52:41 +00:00
Awn
d3bf1187d0
Security and performance optimisations. (#69)
The drawbacks outweighed the pros.

Also, #59 has been modified given developments in the Go compiler.
2018-06-17 19:49:16 +01:00
Awn
3ae890cf43
Add a SafePanic function and utilise it internally. (#64) 2018-06-11 18:03:14 +01:00
Awn
320220fd4c
alloc: use strange bytes (#52)
Like libsodium does, we now fill allocated region with 0xdb bytes in order to help catch bugs due to uninitialized data.
2018-02-12 18:11:49 +00:00
Awn
add6eaa51d
freebsd: add the MAP_NOCORE flag (#51)
On freebsd, we have the option to tell the kernel at mmap time to disregard this memory when dumping to core files.
2018-02-12 17:46:26 +00:00
Awn
826f73771c
memcall: handle openbsd explicitly (#46)
This fixes #45.
2017-11-18 03:14:56 +00:00
Awn
3f5a358670 immutability: redesign api to improve verbosity (#40)
* testing: simplify command

Go 1.9 no longer includes the vendor directory in wildcard commands, so we can remove the verbosity.

* docs: expand contributing guide

* docs: rewrite features list

* docs: remove example

The example for the New function is pretty much redundant.

* memcall: remove execute permissions

Related to #37. More refactoring needed.

* dependencies: update

* immutability: improve verbosity

This change changes the nomenclature and API used to improve verbosity and encourage better programming style.

* docs: improve docs summary

* api: rename EqualTo => EqualBytes

The new name is more clear about its intentions.

* patch: race condition

Use internal API to prevent mutex conflicts.

* docs: improve wording

* docs: fix outdated wording

* canary: minor optimisations

* destroy: refactor and optimise
2017-10-21 00:15:07 +01:00
Awn
c782637f2b Minor updates to names and documentation. (#35)
* Document and test pre-existing behaviour.

* Replace integer constant with sys/unix definition.

* Update project excerpt in README.md

* Rename finaliserGuard to littleBird
2017-08-28 15:19:55 +05:00
Awn
5b8cb7b51c Fix potential leak of canary value (#33)
* Fix outdated comments

* Fix canary leak
2017-08-28 13:45:27 +05:00
Awn
37008e0691 memcall: use stdlib instead of vendoring winapi (#24)
* memcall: use stdlib instead of vendoring winapi

CL https://go-review.googlesource.com/c/47335/ adds VirtualAlloc, VirtualFree,
and VirtualProtect to sys/windows, so we no longer need to vendor those particular
system calls and we can safely use the standard library in our code.

* Fix issue with glide cache
2017-07-04 19:36:57 +01:00
Awn
79d54e0bde Improve handling of kernel mlock limits (#14)
* Add note about kernel limits and encorage deferring.

* Add note to source code documentation.

* Expand error message on Unix

* Expand error message on Windows

* Remove specialised error messages.

* Simplify documentation.

* Improve error message slightly
2017-06-03 14:29:26 +01:00
Awn
bef05e1027
Fix spelling mistake in error message. 2017-05-01 12:59:35 +01:00
Awn
66463af55d
Re-write the documentation. 2017-05-01 12:57:46 +01:00
Awn
e212030df2 v0.2.0 - Manage memory manually and implement new API (#5)
* Added wrapper for Unix's Mprotect

* Panic on failed Lock

* Replaced Mlock code with libsodium counterpart

* Replaced pkg-config with LDFLAG

* Install libsodium as a dependency

* Install libsodium as a dependency, properly

* Install libsodium as a dependency, third time lucky

* Auto-confirm prompts

* Attain super-user before installing

* Install libsodium from tarball instead

* sudo su feezes the conatiner

* Build libsodium in /tmp/

* Really?

* Extract libsodium to tmp

* Temporary change to attain original working directory

* Switch back to working directory after installing libsodium

* Install from apt

* Install from apt, with confirmation

* Install from apt, with more confirmation

* Fix OSX tests too

* cgo is overkill

* Fix tests

* import golang.org/x/sys/windows

* This shouldn't return anything

* Implemented all of the required syscalls on both Unix and Windows

* Update local dependencies

* OSX doesn't support all the functions

* commas are AND

* Fix syntax errors in Windows

* Make Protect function partable

* Implement the front-facing API

* Basic tests

* Guard Pages added and bug fixes

* VirtualFree fix

* Formatting updates and fix windows tests

* Try again fixing windows tests

* Revert changes to Alloc in windows

* Updated a lot. Refactored a lot. Fixed a lot.

* Finishing up

* Added basic test structure. Removed useless calculation.

* Added some tests

* Add CSPRNG for the upcoming canary

* Fix some errors. Write more tests.

* Greater consistency in variable names.

* Test fix on windows.

* Nope

* Switch back to using slices

* Add canarys to detect buffer underflows

* Use global canary instead of individual ones

* Fix tests

* Add Locking functionality back

* Cleanup after tests

* Debugging for windows

* Remove debugging on windows

* Unlock the data pages specifically when destroying

* Fixed nasty bug. Credits to @dotcppfile for spotting it.

* Fixed nasty bug. Credits to @dotcppfile for spotting it.

* Update documentation

* Improve efficiency of DestroyAll. Credits to @dotcppfile

* Add small comment on what the setup protects against.

* Remove notice.

* Update documentation and add PROT_EXEC on Unix.

* Add PROT_EXEC on Unix.

* Remove Lock()

* CatchInterrupt() now can accept a function

* Use pointer arithmetic instead of storing a copy. Full credits to @dotcppfile

* Add authors file

* Add a State field to store the current protection value of the Buffer

* Fix some comments and simplify _getBytes function

* Reword parts of README.md

* Remove leftover Test from removed function

* Keep contributions concise.

* Update pass on dependencies.

* Reword AUTHORS file.

* WriteOnly isn't supported on windows, and isn't useful. Remove it.

* Protect should return nothing on all systems for compatibility.

* Remove outdated references to Locking from comments.

* Remove reference to removed feature from README

* Added array instructions to documentation.

* Add Mutex lock to make MemGuard threadsafe.

* Add note about thread-safety in MemGuard.

* Add proper thread-safety to the API.

* Improved mutexing on Destroy functions

* Improved comments and some code.

* Improved more comments. Added a test.
2017-05-01 01:50:48 +01:00