[PATCH v1 0/2] Add destructor hook to LSM modules

Casey Schaufler casey at schaufler-ca.com
Fri Mar 10 20:49:57 UTC 2023


On 3/10/2023 11:26 AM, Mirsad Goran Todorovac wrote:
> LSM security/integrity/iint.c had the case of kmem_cache_create() w/o a proper
> kmem_cache_destroy() destructor.

LSMs should be using the security blobs associated with system objects
rather than doing their own memory management.

>
> Introducing the release() hook would enable LSMs to release allocated resources
> on exit, and in proper order, rather than dying all together with kernel shutdown
> in an undefined order.
>
> Thanks,
> 	Mirsad
>
> ---
>  include/linux/lsm_hooks.h | 1 +
>  security/integrity/iint.c | 7 +++++++
>  2 files changed, 8 insertions(+)
>
> --
> Mirsad Goran Todorovac
> Sistem inženjer
> Grafički fakultet | Akademija likovnih umjetnosti
> Sveučilište u Zagrebu
>  
> System engineer
> Faculty of Graphic Arts | Academy of Fine Arts
> University of Zagreb, Republic of Croatia
> The European Union



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