propolice patch on 4.10

horio shoichi bugsgrief at bugsgrief.net
Sat Aug 14 16:44:13 PDT 2004


On Sat, 14 Aug 2004 18:10:15 +0530
Siddhartha Jain <sid at netmagicsolutions.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello,
> 
> I wanted the propolice protection for my 4.10 FreeBSD install. So I
> downloaded the latest available propolice patch (for 4.8) and patched
> the source (seemed to go ok). Now after going thru the entire rebuild
> process, how do I verify that the propolice thing is active and fine?
> 
> 
> thanks,
> 
> Siddhartha
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (MingW32)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> 
> iD8DBQFBHgguOGaxOP7knVwRAs5DAJ428pXMgtLhqdPWdQIG7jp3FyaAFwCfTV0L
> TjWCWx5GeRDAZGBuDLBbQFk=
> =xoKI
> -----END PGP SIGNATURE-----
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
> 

Following code (and the instruction) has been snatched from somewhere
discussing Solaris propolice. If you need the credibility, or better
solution please search them yourself.

% cat test-propolice.c
/* test-propolice.c */

#define OVERFLOW "This is longer than 10 bytes"

int main (int argc, char *argv[])
{ char buffer[10]; strcpy(buffer, OVERFLOW); return 0;
} 
% cc test-propolice.c
% ./a.out
Abort (core dumped)
% tail -2 /var/log/messages
Aug 15 08:15:48 hydra a.out: stack overflow in function main
Aug 15 08:15:48 hydra /kernel: pid 75040 (a.out), uid 100: exited on signal 6 (core dumped)
% cc -fno-stack-protector test-propolice.c
% ./a.out
Segmentation fault (core dumped)
% tail -3 /var/log/messages
Aug 15 08:15:48 hydra a.out: stack overflow in function main
Aug 15 08:15:48 hydra /kernel: pid 75040 (a.out), uid 100: exited on signal 6 (core dumped)
Aug 15 08:19:05 hydra /kernel: pid 75051 (a.out), uid 100: exited on signal 11 (core dumped)
%

Above test is done on 4.9-STABLE.

Note the propolice produced messages:

o "Abort" on terminal, and
o "stack overflow" in log file.




horio shoichi



More information about the freebsd-questions mailing list