summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
Diffstat (limited to 'README')
-rw-r--r--README110
1 files changed, 0 insertions, 110 deletions
diff --git a/README b/README
deleted file mode 100644
index 7e9c111..0000000
--- a/README
+++ /dev/null
@@ -1,110 +0,0 @@
1What is it?
2===========
3
4This is a standalone implementation of fortify source[0]. It provides
5compile time buffer checks. It is libc-agnostic and simply overlays the
6system headers by using the #include_next extension found in GCC. It was
7initially intended to be used on musl[1] based Linux distributions[2].
8
9
10Features
11========
12
13- It is portable, works on *BSD, Linux, Solaris and possibly others.
14- It will only trap non-conformant programs. This means that fortify
15 level 2 is treated in the same way as level 1.
16- Avoids making function calls when undefined behaviour has already been
17 invoked. This is handled by using __builtin_trap().
18- Support for out-of-bounds read interfaces, such as send(), write(),
19 fwrite() etc.
20- No ABI is enforced. All of the fortify check functions are inlined
21 into the resulting binary.
22
23
24Sample usage
25============
26
27If you want to quickly test it, you can try something like the following:
28
29cat > fgets.c <<EOF
30#include <stdio.h>
31int
32main(void)
33{
34 char buf[BUFSIZ];
35 fgets(buf, sizeof(buf) + 1, stdin);
36 return 0;
37}
38EOF
39cc -I<path-to-fortify-include-dir> -D_FORTIFY_SOURCE=1 -O1 fgets.c
40./a.out
41
42At this point, the program will safely crash.
43
44
45Supported interfaces
46====================
47
48FD_CLR
49FD_SET
50bcopy
51bzero
52confstr
53fgets
54fgetws
55fread
56fwrite
57getcwd
58getdomainname
59getgroups
60gethostname
61getlogin_r
62mbsnrtowcs
63mbsrtowcs
64mbstowcs
65memcpy
66memmove
67mempcpy
68memset
69poll
70ppoll
71pread
72read
73readlink
74readlinkat
75realpath
76recv
77recvfrom
78send
79sendto
80snprintf
81sprintf
82stpcpy
83stpncpy
84strcat
85strcpy
86strlcat
87strlcpy
88strncat
89strncpy
90ttyname_r
91vsnprintf
92vsprintf
93wcrtomb
94wcscat
95wcscpy
96wcsncat
97wcsncpy
98wcsnrtombs
99wcsrtombs
100wcstombs
101wctomb
102wmemcpy
103wmemmove
104wmemset
105write
106
107
108[0] http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html
109[1] http://www.musl-libc.org/
110[2] http://git.alpinelinux.org/cgit/aports/commit/?id=067a4f28825478911bb62be3b8da758d9722753e