rpms/dietlibc/devel dietlibc-0.31-defpath.patch, NONE, 1.1 dietlibc-0.31-stacksmash-dyn.patch, NONE, 1.1 dietlibc-0.31-stacksmash.patch, NONE, 1.1 lastver, NONE, 1.1 verinfo, NONE, 1.1
Enrico Scholz (ensc)
fedora-extras-commits at redhat.com
Sat Sep 1 12:34:44 UTC 2007
- Previous message (by thread): rpms/dietlibc/F-7 dietlibc-0.31-defpath.patch, NONE, 1.1 dietlibc-0.31-stacksmash-dyn.patch, NONE, 1.1 dietlibc-0.31-stacksmash.patch, NONE, 1.1 lastver, NONE, 1.1 verinfo, NONE, 1.1
- Next message (by thread): rpms/dietlibc/devel sources,1.6,1.7 dietlibc.spec,1.27,1.28
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: ensc
Update of /cvs/extras/rpms/dietlibc/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22772
Added Files:
dietlibc-0.31-defpath.patch dietlibc-0.31-stacksmash-dyn.patch
dietlibc-0.31-stacksmash.patch lastver verinfo
Log Message:
initial checkin
dietlibc-0.31-defpath.patch:
--- NEW FILE dietlibc-0.31-defpath.patch ---
diff -up dietlibc-0.31/include/paths.h.~1~ dietlibc-0.31/include/paths.h
--- dietlibc-0.31/include/paths.h.defpath
+++ dietlibc-0.31/include/paths.h
@@ -2,7 +2,7 @@
#define _PATHS_H
#define _PATH_BSHELL "/bin/sh"
-#define _PATH_DEFPATH "/bin:/usr/bin:"
+#define _PATH_DEFPATH "/bin:/usr/bin"
#define _PATH_DEVNULL "/dev/null"
dietlibc-0.31-stacksmash-dyn.patch:
--- NEW FILE dietlibc-0.31-stacksmash-dyn.patch ---
diff -up dietlibc-0.31/lib/stack_smash_handler2.c.~1~ dietlibc-0.31/lib/stack_smash_handler2.c
--- dietlibc-0.31/lib/stack_smash_handler2.c.~1~ 2007-09-01 14:13:21.000000000 +0200
+++ dietlibc-0.31/lib/stack_smash_handler2.c 2007-09-01 14:13:40.000000000 +0200
@@ -2,6 +2,7 @@
#include <write12.h>
void __stack_chk_fail(void);
+void __stack_chk_fail_local(void) __attribute__((__alias__("__stack_chk_fail")));
/* earlier versions of ProPolice actually gave the address and function
* name as arguments to the handler, so it could print some useful
dietlibc-0.31-stacksmash.patch:
--- NEW FILE dietlibc-0.31-stacksmash.patch ---
2007-09-01 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
* lib/stack_smash_handler2: modified __stack_chk_fail() to trigger
a segfault by accessing address 0x0. Every system with an MMU
known by me, segfaults by dereferencing a NULL pointer
* Makefile: added hack to compile stack_smash_handler2 with
'--fno-omit-frame-pointer'.
diff -up dietlibc-0.31/lib/stack_smash_handler2.c.~1~ dietlibc-0.31/lib/stack_smash_handler2.c
--- dietlibc-0.31/lib/stack_smash_handler2.c.stacksmash
+++ dietlibc-0.31/lib/stack_smash_handler2.c
@@ -8,5 +8,13 @@ void __stack_chk_fail(void);
* diagnostics. No more. :-( */
void __stack_chk_fail(void) {
__write2("smashed stack detected, program terminated.\n");
- _exit(127);
+
+ /* trigger a segfault which can be inspected within a debugger (inclusive
+ * stack-trace). 'abort(3)' at this place would be too heavy weighted.
+ *
+ * TODO: limit this to systems which are known to have an MMU (resp. is
+ * dietlibc with stack-protector used on systems without an MMU?)
+ */
+ while (1)
+ *(char *)0 = 0;
}
--- dietlibc-0.31/Makefile.stacksmash
+++ dietlibc-0.31/Makefile
@@ -172,9 +172,10 @@ $(OBJDIR)/%.o: %.S $(ARCH)/syscalls.h
$(OBJDIR)/pthread_%.o: libpthread/pthread_%.c
$(CROSS)$(CC) $(INC) $(CFLAGS) -c $< -o $@
$(COMMENT) -$(CROSS)strip -x -R .comment -R .note $@
+$(OBJDIR)/stack_smash_handler2.o: XCFLAGS:=-fno-omit-frame-pointer
$(OBJDIR)/%.o: %.c
- $(CROSS)$(CC) $(INC) $(CFLAGS) -c $< -o $@ -D__dietlibc__
+ $(CROSS)$(CC) $(INC) $(CFLAGS) $(XCFLAGS) -c $< -o $@ -D__dietlibc__
$(COMMENT) -$(CROSS)strip -x -R .comment -R .note $@
endif
--- NEW FILE lastver ---
0.31
--- NEW FILE verinfo ---
http://www.kernel.org/pub/linux/libs/dietlibc/
dietlibc-(.*?).tar.bz2
- Previous message (by thread): rpms/dietlibc/F-7 dietlibc-0.31-defpath.patch, NONE, 1.1 dietlibc-0.31-stacksmash-dyn.patch, NONE, 1.1 dietlibc-0.31-stacksmash.patch, NONE, 1.1 lastver, NONE, 1.1 verinfo, NONE, 1.1
- Next message (by thread): rpms/dietlibc/devel sources,1.6,1.7 dietlibc.spec,1.27,1.28
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list