From: Jarkko Hietaniemi Date: Tue, 9 Sep 2003 11:55:33 +0000 (+0000) Subject: Warn more about disclosing the hash seed, from Scott A. Crosby. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=26a2d34763c26e0d624a4f2227cb0f7da1812632;p=p5sagit%2Fp5-mst-13.2.git Warn more about disclosing the hash seed, from Scott A. Crosby. p4raw-id: //depot/perl@21139 --- diff --git a/lib/Hash/Util.pm b/lib/Hash/Util.pm index 8e8c952..c5d3059 100644 --- a/lib/Hash/Util.pm +++ b/lib/Hash/Util.pm @@ -187,6 +187,12 @@ hash_seed() returns the seed number used to randomise hash ordering. Zero means the "traditional" random hash ordering, non-zero means the new even more random hash ordering introduced in Perl 5.8.1. +B: by knowing it one +can craft a denial-of-service attack against Perl code, even remotely, +see L for more information. +B to people who don't need to know it. +See also L. + =cut sub hash_seed () { diff --git a/pod/perlrun.pod b/pod/perlrun.pod index 7f32e94..81d4749 100644 --- a/pod/perlrun.pod +++ b/pod/perlrun.pod @@ -1139,16 +1139,24 @@ the pseudorandom seed supplied by the operating system and libraries. This means that each different run of Perl will have a different ordering of the results of keys(), values(), and each(). -See L for more information, -and also L. +B. Hashes are +randomized to protect against local and remote attacks against Perl +code. By manually setting a seed this protection may be partially or +completely lost. + +See L and +L for more information. =item PERL_HASH_SEED_DEBUG (Since Perl 5.8.1.) Set to one to display (to STDERR) the value of -the hash seed at the beginning of execution. B: by knowing it one can craft a -denial-of-service attack against Perl code, even remotely, see -L for more information. +the hash seed at the beginning of execution. This, combined with +L is intended to aid in debugging nondeterministic +behavior caused by hash randomization. + +B: by knowing it one +can craft a denial-of-service attack against Perl code, even remotely, +see L for more information. B to people who don't need to know it. See also hash_seed() of L.