]> git.ipfire.org Git - thirdparty/krb5.git/commit
Improve checking of decoded DB2 principal values
authorGreg Hudson <ghudson@mit.edu>
Tue, 23 Aug 2016 17:41:00 +0000 (13:41 -0400)
committerTom Yu <tlyu@mit.edu>
Fri, 2 Sep 2016 22:30:32 +0000 (18:30 -0400)
commitda19877809618425c7232544c4910d2d865385c2
tree18de84753f9f9a8e6724e979cb2e868cf311f1e0
parent2cd4ec15e28f669e650c71a52c2a755a982820e2
Improve checking of decoded DB2 principal values

In krb5_decode_princ_entry(), verify the length of the principal name
before calling krb5_parse_name() or strlen(), to avoid a possible
buffer read overrun.  Check all length fields for negative values.
Avoid performing arithmetic as part of bounds checks.  If the value of
key_data_ver is unexpected, return KRB5_KDB_BAD_VERSION instead of
aborting.

(cherry picked from commit e3d9f03a658e247dbb43cb345aa93a28782fd995)

ticket: 8481
version_fixed: 1.13.7
src/plugins/kdb/db2/kdb_xdr.c