[lvc-project] [PATCH net v3] net: cxgb4/ch_ipsec: fix potential use-after-free in ch_ipsec_xfrm_add_state() callback

Jakub Kicinski kuba at kernel.org
Thu Oct 16 03:26:49 MSK 2025


On Mon, 13 Oct 2025 12:58:08 +0300 Pavel Zhigulin wrote:
> +	if (unlikely(!try_module_get(THIS_MODULE))) {
> +		NL_SET_ERR_MSG_MOD(extack, "Failed to acquire module reference");
> +		return -ENODEV;
> +	}
> +
>  	sa_entry = kzalloc(sizeof(*sa_entry), GFP_KERNEL);
>  	if (!sa_entry) {
>  		res = -ENOMEM;

I think now you're missing a module put if something fails later.
-- 
pw-bot: cr



More information about the lvc-project mailing list