KEYS: Fix use-after-free in assoc_array_gc()
authorDavid Howells <dhowells@redhat.com>
Tue, 2 Sep 2014 12:52:20 +0000 (13:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Sep 2014 16:19:29 +0000 (09:19 -0700)
commited35863a772342685da9433eb930400bb4963c60
tree8b6a765c2b9c4780469c40a34dfc8f7a6fd8ea27
parentd6e22ca59611f6df36c00b359e639d77004a2278
KEYS: Fix use-after-free in assoc_array_gc()

commit 27419604f51a97d497853f14142c1059d46eb597 upstream.

An edit script should be considered inaccessible by a function once it has
called assoc_array_apply_edit() or assoc_array_cancel_edit().

However, assoc_array_gc() is accessing the edit script just after the
gc_complete: label.

Reported-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
cc: shemming@brocade.com
cc: paulmck@linux.vnet.ibm.com
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/assoc_array.c