Skip Menu |
 

From: ghudson@mit.edu
Subject: SVN Commit

kdb_db2's ctx_iterate makes an convenience alias to dbc->db in order
to call more invoke call the DB's seq method. This alias may become
invalidated if the callback writes to the DB, since ctx_lock() may
re-open the DB in order to acquire a write lock. Fix the bug by
getting rid of the convenience alias.

Most KDB iteration operations in the code base do not write to the DB,
but kdb5_util update_princ_encryption does.

Bug discovered and diagnosed by will.fiveash@oracle.com.

https://github.com/krb5/krb5/commit/4df31be8282f744201814493ebe0dbe92bcb8bcd
Commit By: ghudson
Revision: 25723
Changed Files:
U trunk/src/plugins/kdb/db2/kdb_db2.c
This bug appears to be very old. The fix should be conceptually the same
for all releases, but the code structure changed in the DAL cleanup so the
exact patch probably won't apply to all releases.
From: tlyu@mit.edu
Subject: SVN Commit

Pull up r25723 from trunk

------------------------------------------------------------------------
r25723 | ghudson | 2012-03-01 15:49:17 -0500 (Thu, 01 Mar 2012) | 16 lines

ticket: 7096
subject: Fix KDB iteration when callback does write calls
target_version: 1.10.1
tags: pullup

kdb_db2's ctx_iterate makes an convenience alias to dbc->db in order
to call more invoke call the DB's seq method. This alias may become
invalidated if the callback writes to the DB, since ctx_lock() may
re-open the DB in order to acquire a write lock. Fix the bug by
getting rid of the convenience alias.

Most KDB iteration operations in the code base do not write to the DB,
but kdb5_util update_princ_encryption does.

Bug discovered and diagnosed by will.fiveash@oracle.com.

https://github.com/krb5/krb5/commit/fd769cb984077b539dcdcb883bdc96dcbd08cb4a
Commit By: tlyu
Revision: 25740
Changed Files:
U branches/krb5-1-10/src/plugins/kdb/db2/kdb_db2.c