[PATCH] ima: free the rule label list in ima_free_rule()

sashiko-bot at kernel.org sashiko-bot at kernel.org
Fri Nov 27 07:32:52 UTC 2026


> ima_parse_rule() allocates entry->label as an option list, like
> entry->keyrings, but ima_free_rule() only frees entry->keyrings. The label
> list is leaked when a rule is freed, for example when a policy write
> containing "label=" is rejected.
> 
> Free entry->label next to the keyrings list.
> 
> Fixes: 47d76a484050 ("IMA: limit critical data measurement based on a label")
> Signed-off-by: Cong Nguyen <congnt264 at gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261127072927.172066-1-congnt264@gmail.com?part=1



More information about the Linux-security-module-archive mailing list