plan9fox/sys
cinap_lenrek bfd8098b8d devcap: timeout capabilities after a minute, fix memory leak, paranoia
the manpage states that capabilities time out after a minute,
so we add ticks field into the Caphash struct and record the
time when the capability was inserted. freeing old capabilities
is handled in trimcaps(), which makes room for one extra cap
and frees timed out ones.

we also limit the capuse write size to less than 1024 bytes to
prevent denial of service as we have to copy the user buffer.
(memory exhaustion).

we have to check the from user *before* attempting to remove
the capability! the wrong user shouldnt be able to change any
state. this fixes the memory leak of the caphash.

do the hash comparsion with tsmemcmp(), avoiding timing
side channels.

allocate the capabilities in secret memory pool to prevent
debugger access.
2016-09-07 21:14:23 +02:00
..
doc closed spew branch 2016-04-28 20:52:36 +02:00
games/lib fortunes: Emacs now supports webkit. 2016-06-19 18:40:46 -04:00
include mp.h: add mpasr 2016-08-28 16:05:22 +02:00
lib fix wrong manpage section index generation for rc-httpd(8) 2016-08-27 22:37:08 +02:00
man pc(1): manpage: restore previous size rather than set to 10 2016-09-01 11:46:44 +00:00
src devcap: timeout capabilities after a minute, fix memory leak, paranoia 2016-09-07 21:14:23 +02:00