]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r259286,259424,259425:
authorbjk <bjk@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 16 Dec 2013 02:30:56 +0000 (02:30 +0000)
committerbjk <bjk@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 16 Dec 2013 02:30:56 +0000 (02:30 +0000)
commit9daed217eb24603f8e0fa1e583846346fc6bbdad
tree8c5778647f24a8ac061f052f9e72f9c12f355fb8
parent2cc9ef1962a75314a8bff2597d796ea71b6e59e1
MFC r259286,259424,259425:
  Apply patch from upstream Heimdal for encoding fix

  RFC 4402 specifies the implementation of the gss_pseudo_random()
  function for the krb5 mechanism (and the C bindings therein).
  The implementation uses a PRF+ function that concatenates the output
  of individual krb5 pseudo-random operations produced with a counter
  and seed.  The original implementation of this function in Heimdal
  incorrectly encoded the counter as a little-endian integer, but the
  RFC specifies the counter encoding as big-endian.  The implementation
  initializes the counter to zero, so the first block of output (16 octets,
  for the modern AES enctypes 17 and 18) is unchanged.  (RFC 4402 specifies
  that the counter should begin at 1, but both existing implementations
  begin with zero and it looks like the standard will be re-issued, with
  test vectors, to begin at zero.)

  This is upstream's commit f85652af868e64811f2b32b815d4198e7f9017f6,
  from 13 October, 2013:
  % Fix krb5's gss_pseudo_random() (n is big-endian)
  %
  % The first enctype RFC3961 prf output length's bytes are correct because
  % the little- and big-endian representations of unsigned zero are the
  % same.  The second block of output was wrong because the counter was not
  % being encoded as big-endian.
  %
  % This change could break applications.  But those applications would not
  % have been interoperating with other implementations anyways (in
  % particular: MIT's).

Bump __FreeBSD_version accordingly and add a note in UPDATING.

Approved by: hrs (mentor, src committer)

git-svn-id: svn://svn.freebsd.org/base/stable/8@259449 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
UPDATING
crypto/heimdal/lib/gssapi/krb5/prf.c
sys/sys/param.h