[PATCH 3.14 11/29] apparmor: fix ref count leak when profile sha1 hash is read

From: Greg Kroah-Hartman
Date: Sun Aug 14 2016 - 16:13:46 EST


3.14-stable review patch. If anyone has any objections, please let me know.

------------------

From: John Johansen <john.johansen@xxxxxxxxxxxxx>

commit 0b938a2e2cf0b0a2c8bac9769111545aff0fee97 upstream.

Signed-off-by: John Johansen <john.johansen@xxxxxxxxxxxxx>
Acked-by: Seth Arnold <seth.arnold@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
security/apparmor/apparmorfs.c | 1 +
1 file changed, 1 insertion(+)

--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -331,6 +331,7 @@ static int aa_fs_seq_hash_show(struct se
seq_printf(seq, "%.2x", profile->hash[i]);
seq_puts(seq, "\n");
}
+ aa_put_profile(profile);

return 0;
}