mailing list of musl libc
 help / color / mirror / code / Atom feed
* standalone fortify source implementation
@ 2015-02-04 16:02 Dimitris Papastamos
  2015-02-04 16:21 ` Daniel Cegiełka
  2015-02-10 14:54 ` Dimitris Papastamos
  0 siblings, 2 replies; 5+ messages in thread
From: Dimitris Papastamos @ 2015-02-04 16:02 UTC (permalink / raw)
  To: musl

Hi everyone,

I have been working on a standalone fortify source implementation[0] that
uses GCC's #include_next to overlay over the system headers.  The current
implementation has been tested against musl libc and OpenBSD's libc.

This implementation only supports _FORTIFY_SOURCE=1.  Level 2 is the same
as level 1.  If this is to be used by default on a system it makes sense
to only catch cases where UB would be invoked (level 1) rather than trap
on suspicious but legal code (level 2).

At the moment only out of bound writes are caught.  Should the implementation
trap on out of bound reads as well?

Overlap checks have been added to memcpy() and will probably be added to
other functions as well.

A short list of functions that still need to be covered:

* wide versions of existing functions
* confstr()
* fread()
* getcwd()
* getgroups()
* gethostname()
* poll()/ppoll()
* readlink()/readlinkat()
* reentrant variants such as ttyname_r, getlogin_r() etc.

I've received very useful feedback from dalias and fabled on IRC.  I
am putting this out here so that more people can have a look and share their
comments.

Thanks,
Dimitris

[0] http://git.2f30.org/fortify/


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-02-10 14:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-04 16:02 standalone fortify source implementation Dimitris Papastamos
2015-02-04 16:21 ` Daniel Cegiełka
2015-02-04 16:26   ` Dimitris Papastamos
2015-02-04 16:33   ` Rich Felker
2015-02-10 14:54 ` Dimitris Papastamos

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).