Skip Menu |
 

Subject: kprop doesn't work with RC4 session key
If you create a working kprop/kpropd setup and then add
"permitted_enctypes=arcfour-hmac-md5" to [libdefaults] in krb5.conf,
running kprop will produce:

kprop: Message size is incompatible with encryption type while
encoding database block starting at 0

The error originates from lib/crypto/builtin/enc_provider/rc4.c line 112
where it checks the size of the cipher state.

The offender here is krb5_auth_con_initivector() and the corresponding
code in mk_priv.c (line 73, where it processes i_vector). This code
assumes that an all-zeros block of the cipher blocksize is a valid
cipher state, which isn't true for RC4.

Nothing else in our code base uses krb5_auth_con_initivector, so this
bug has flown under the radar so far. It has likely been present since
the introduction of RC4.
From: ghudson@mit.edu
Subject: SVN Commit

Make kprop/kpropd work with RC4 session key

In krb5_auth_con_initivector and mk_priv/rd_priv, stop assuming that
the enctype's block size is the size of the cipher state. Instead,
make and discard a cipher state to get the size.

https://github.com/krb5/krb5/commit/8d01455ec9ed88bd3ccae939961a6e123bb3d45f
Author: Greg Hudson <ghudson@mit.edu>
Commit: 8d01455ec9ed88bd3ccae939961a6e123bb3d45f
Branch: master
src/lib/krb5/krb/auth_con.c | 20 ++++++++++----------
src/lib/krb5/krb/mk_priv.c | 9 +++++----
src/lib/krb5/krb/rd_priv.c | 10 ++++------
3 files changed, 19 insertions(+), 20 deletions(-)
From: tlyu@mit.edu
Subject: SVN Commit

Make kprop/kpropd work with RC4 session key

In krb5_auth_con_initivector and mk_priv/rd_priv, stop assuming that
the enctype's block size is the size of the cipher state. Instead,
make and discard a cipher state to get the size.

(cherry picked from commit 8d01455ec9ed88bd3ccae939961a6e123bb3d45f)

https://github.com/krb5/krb5/commit/ceead53ba577b2c30550fbde451d82d9db3ba45f
Author: Greg Hudson <ghudson@mit.edu>
Committer: Tom Yu <tlyu@mit.edu>
Commit: ceead53ba577b2c30550fbde451d82d9db3ba45f
Branch: krb5-1.11
src/lib/krb5/krb/auth_con.c | 20 ++++++++++----------
src/lib/krb5/krb/mk_priv.c | 9 +++++----
src/lib/krb5/krb/rd_priv.c | 10 ++++------
3 files changed, 19 insertions(+), 20 deletions(-)
Joe Travaglini reported this bug.