Patch "eCryptfs: use after free in ecryptfs_release_messaging()" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
eCryptfs: use after free in ecryptfs_release_messaging()
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ecryptfs-use-after-free-in-ecryptfs_release_messaging.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
db86be3a12d0b6e5c5b51c2ab2a48f06329cb590Mon Sep 17 00:00:00 2001
From: Dan Carpenter <[email protected]>
Date: Tue, 22 Aug 2017 23:41:28 +0300
Subject: eCryptfs: use after free in ecryptfs_release_messaging()
From: Dan Carpenter <[email protected]>
commit db86be3a12d0b6e5c5b51c2ab2a48f06329cb590 upstream.
We're freeing the list iterator so we should be using the _safe() version of hlist_for_each_entry().
--- fs/ecryptfs/messaging.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
fs/ecryptfs/messaging.c +4 -3
@@ -442,15 +442,16 @@ void ecryptfs_release_messaging(void) }if (ecryptfs_daemon_hash) {struct ecryptfs_daemon *daemon; +struct hlist_node *n;int i;mutex_lock (&ecryptfs_daemon_hash_mux);for (i =0 ; i < (1 << ecryptfs_hash_bits); i++) {int rc; -hlist_for_each_entry (daemon, - &ecryptfs_daemon_hash[i], - euid_chain) { +hlist_for_each_entry_safe (daemon, n, + &ecryptfs_daemon_hash[i], + euid_chain) { rc =ecryptfs_exorcise_daemon (daemon);if (rc) printk(KERN_ERR "%s: Error whilst "
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/ecryptfs-use-after-free-in-ecryptfs_release_messaging.patch