possible profile null pointer deref in threaded app
authorKen Raeburn <raeburn@mit.edu>
Wed, 23 Feb 2005 22:47:14 +0000 (22:47 +0000)
committerKen Raeburn <raeburn@mit.edu>
Wed, 23 Feb 2005 22:47:14 +0000 (22:47 +0000)
commitf05d4a68666076476ae1f38d48f6f33e0a407b30
tree38190ff81fc50b6b7c2f875140ddddcc4cafe71a
parent3f7ac15d71e42eddce8807e73b91730a63b45a02
possible profile null pointer deref in threaded app

There seems to be a problem with a null pointer popping up when
profile_node_iterator reads ...->data->root to start walking through the
contents.  Don't have a lot of details, but I've got some patches that might
tighten things up a little.

* prof_tree.c (profile_node_iterator): Check that the root node pointer is not
null; raise assertion failure if it is.

* prof_int.h: Include k5-platform.h.
(struct _prf_data_t): Reorder fields, and insert some padding.

* prof_file.c (scan_shared_trees_locked): Check that the "root" field isn't
null.
(profile_open_file): Update the in-memory file contents after updating the
refcount instead of before.
(profile_update_file_data): If the root node in the file data is null, always
do the update.  Check that it's not null before returning a success
indication.
(profile_dereference_data_locked): Scan linked list of file data objects for
sanity check, before and after.
(profile_dereference_data_locked): Don't do it here.

ticket: new
status: open

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17106 dc483132-0cff-0310-8789-dd5450dbe970
src/util/profile/ChangeLog
src/util/profile/prof_file.c
src/util/profile/prof_int.h
src/util/profile/prof_tree.c