remarkable-linux/security/smack
Himanshu Shukla b437aba85b SMACK: Fix the memory leak in smack_cred_prepare() hook
Memory leak in smack_cred_prepare()function.
smack_cred_prepare() hook returns error if there is error in allocating
memory in smk_copy_rules() or smk_copy_relabel() function.
If smack_cred_prepare() function returns error then the calling
function should call smack_cred_free() function for cleanup.
In smack_cred_free() function first credential is  extracted and
then all rules are deleted. In smack_cred_prepare() function security
field is assigned in the end when all function return success. But this
function may return before and memory will not be freed.

Signed-off-by: Himanshu Shukla <himanshu.sh@samsung.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
2016-11-10 11:22:06 -08:00
..
Kconfig Smack: Signal delivery as an append operation 2016-09-08 13:22:56 -07:00
Makefile Smack: Repair netfilter dependency 2015-01-23 10:08:19 -08:00
smack.h Smack: Signal delivery as an append operation 2016-09-08 13:22:56 -07:00
smack_access.c vfs: make the string hashes salt the hash 2016-06-10 20:21:46 -07:00
smack_lsm.c SMACK: Fix the memory leak in smack_cred_prepare() hook 2016-11-10 11:22:06 -08:00
smack_netfilter.c security: Use IS_ENABLED() instead of checking for built-in or module 2016-08-08 13:08:25 -04:00
smackfs.c Smack: Use memdup_user() rather than duplicating its implementation 2016-08-23 09:58:21 -07:00