diff -Nru paxtest-0.9.11/anonmap.c paxtest-0.9.14/anonmap.c --- paxtest-0.9.11/anonmap.c 2010-02-21 20:14:52.000000000 +0000 +++ paxtest-0.9.14/anonmap.c 2015-09-29 12:20:26.000000000 +0000 @@ -29,7 +29,7 @@ exit( 1 ); } - copy_shellcode(buf, SHELLCODE_RETURN); + copy_shellcode(buf); /* Convert the pointer to a function pointer */ func = (fptr)buf; diff -Nru paxtest-0.9.11/body.c paxtest-0.9.14/body.c --- paxtest-0.9.11/body.c 2010-10-22 02:01:36.000000000 +0000 +++ paxtest-0.9.14/body.c 2015-09-29 12:20:26.000000000 +0000 @@ -1,4 +1,4 @@ -/* body.c - This part is shared by the test programs (except for the randomisation +/* body.c - This part is shared by the test programs (except for the randomization * tests) * * Copyright (c)2003,2004 by Peter Busser @@ -16,9 +16,8 @@ #include #include #include +#include "body.h" -extern int doit( void ); -extern const char testname[]; static void *test_thread(void *p) { @@ -93,10 +92,12 @@ { void *ptr; int retval; - long PAGESIZE = sysconf(_SC_PAGESIZE); + unsigned long pagesize = sysconf(_SC_PAGESIZE); + unsigned long offset = (unsigned long) addr & (pagesize - 1); - /* Allign to a multiple of PAGESIZE, assumed to be a power of two */ - ptr = (char *)(((unsigned long) addr) & ~(PAGESIZE-1)); + /* Align to a multiple of PAGESIZE, assumed to be a power of two */ + ptr = (void *)((unsigned long) addr - offset); + len += offset; retval = mprotect( ptr, len, prot ); if( retval != 0 && (errno == EINVAL)) { diff -Nru paxtest-0.9.11/body.h paxtest-0.9.14/body.h --- paxtest-0.9.11/body.h 2004-03-05 11:50:42.000000000 +0000 +++ paxtest-0.9.14/body.h 2015-09-29 12:20:08.000000000 +0000 @@ -1,4 +1,16 @@ +#ifndef _BODY_H_ +#define _BODY_H_ + +#include + +/* provided by body.c */ void itworked( void ); void itfailed( void ); int do_mprotect( const void *addr, size_t len, int prot ); + +/* provided by individual tests */ typedef void (*fptr)(void); +extern const char testname[]; +void doit( void ); + +#endif diff -Nru paxtest-0.9.11/ChangeLog paxtest-0.9.14/ChangeLog --- paxtest-0.9.11/ChangeLog 2016-05-03 06:33:49.000000000 +0000 +++ paxtest-0.9.14/ChangeLog 2015-09-29 12:30:48.000000000 +0000 @@ -1,88 +1,23 @@ -paxtest (1:0.9.11-2) unstable; urgency=low +paxtest (0.9.14-1) stable; urgency=low + * Various fixes/cleanups including ensuring an overflowing strcpy/memcpy isn't + optimized away, from Mathias Krause (mathias.krause@secunet.com) + * Updated the representative results + +paxtest (0.9.13-1) stable; urgency=low + * Added VDSO randomization test + * Added basic entropy quality testing, subtracts weak bits from entropy count + * Increased iterations for all randomization tests but the exhaustion tests - * New upstream release, uploaded to Debian. (Closes: #665800) - - The upstream fixed the FTBFS error reported - "fix build with ld - --as-needed". Makefile.psm now places libraries behind the objects - needing their symbols on the commandline when building with ld - --as-needed (initially reported with patch by Julian Taylor - ) (LP: #831405) (Closes: #639128) - * debian/control: - - Add, as to the list of architectures the following: amd64 sparc powerpc - (as they seem to be supported in the source). - - Put full maintainer's name in UTF-8 - * debian/changelog: - - Add changelog of Ubuntu entry - - Add dates to upstream releases based on timestamps of files at - http://grsecurity.net/~spender/ - * debian/sample.debian, debian/rules: - - Add an output example when running in a Debian system (a kernel that - does not include the grsecurity patch) - - -- Javier Fernández-Sanguino Peña Mon, 04 Nov 2013 19:31:08 +0100 +paxtest (0.9.12-1) stable; urgency=low + * Added ARM support paxtest (0.9.11-1) stable; urgency=low * Added display of exhaustion tests - -- Brad Spengler Thu, 31 Jan 2013 23:21:00 +0200 - paxtest (0.9.10-1) stable; urgency=low * Fixed compilation problem reported on forums * Added display of argv/env randomization - -- Brad Spengler Thu, 29 Dec 2012 19:42:00 +0200 - -paxtest (1:0.9.9-1ubuntu1) oneiric; urgency=low - - * Fix FTBFS with ld --as-needed. LP: #831405. - - -- Matthias Klose