Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 76082 | Differences between
and this patch

Collapse All | Expand All

(-)udev-054.orig/klibc/klibc/Makefile (-1 / +1 lines)
Lines 46-52 Link Here
46
	  lrand48.o jrand48.o mrand48.o nrand48.o srand48.o seed48.o \
46
	  lrand48.o jrand48.o mrand48.o nrand48.o srand48.o seed48.o \
47
	  inet/inet_ntoa.o inet/inet_aton.o inet/inet_addr.o \
47
	  inet/inet_ntoa.o inet/inet_aton.o inet/inet_addr.o \
48
	  inet/inet_ntop.o inet/inet_pton.o inet/bindresvport.o \
48
	  inet/inet_ntop.o inet/inet_pton.o inet/bindresvport.o \
49
	  send.o recv.o
49
	  send.o recv.o ssp.o
50
ifeq ($(ERRLIST),1)
50
ifeq ($(ERRLIST),1)
51
LIBOBJS += errlist.o
51
LIBOBJS += errlist.o
52
endif
52
endif
(-)udev-054.orig/klibc/klibc/ssp.c (+15 lines)
Line 0 Link Here
1
#include <syslog.h>
2
#include <stdlib.h>
3
#include <sys/param.h>
4
5
unsigned long __guard = 0UL; static void __guard_setup(void) __attribute__ ((constructor));
6
void __stack_smash_handler(char func[], int damaged __attribute__ ((unused)));
7
static void __guard_setup(void) { if (__guard != 0UL) return; __guard = 0xFF0A0D00UL; }
8
9
void __stack_smash_handler(char func[], int damaged) { 
10
	syslog(LOG_CRIT, "stack overflow in function %s(); %s=%p __guard_setup=%p __guard=%p " \
11
		"PPID=%d PID=%d UID=%d EUID=%d GID=%d EGID=%d", 
12
		func, func, __guard_setup, __guard,
13
		getppid(), getpid(), getuid(), geteuid(), getgid(), getegid());
14
	_exit(127);
15
}

Return to bug 76082