Skip to content
Snippets Groups Projects
Commit 9df6a487 authored by Tianjia Zhang's avatar Tianjia Zhang Committed by Mimi Zohar
Browse files

integrity: Fix possible multiple allocation in integrity_inode_get()


When integrity_inode_get() is querying and inserting the cache, there
is a conditional race in the concurrent environment.

The race condition is the result of not properly implementing
"double-checked locking". In this case, it first checks to see if the
iint cache record exists before taking the lock, but doesn't check
again after taking the integrity_iint_lock.

Fixes: bf2276d1 ("ima: allocating iint improvements")
Signed-off-by: default avatarTianjia Zhang <tianjia.zhang@linux.alibaba.com>
Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com>
Cc: <stable@vger.kernel.org> # v3.10+
Signed-off-by: default avatarMimi Zohar <zohar@linux.ibm.com>
parent db1d1e8b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment