Re: [PATCH] net: esp4: Fix double free on esp4 functions

2019-01-30 Thread Steffen Klassert
On Thu, Jan 31, 2019 at 06:32:07AM +, Ramin Farajpour Cami wrote: > Hi Eric, > > I going to for avoid double free of resource identifiers we should set > variables initialized in "tmp/key" to NULL if an error occurred int the > "esp_init_authenc()" and "esp_output_tail()" attempts to free the

Re: [PATCH] net: esp4: Fix double free on esp4 functions

2019-01-30 Thread David Miller
From: Ramin Farajpour Cami Date: Wed, 30 Jan 2019 21:35:42 + > key/tmp is being kfree'd twice,once in the > "aalg_desc->uinfo.auth.icv_fullbits / 8 != crypto_aead_authsize(aead)" call > to "free_key",twice When "crypto_aead_setauthsize(aead, > x->aalg->alg_trunc_len / 8)" fails call to agai

Re: [PATCH] net: esp4: Fix double free on esp4 functions

2019-01-30 Thread Eric Dumazet
On 01/30/2019 01:35 PM, Ramin Farajpour Cami wrote: > key/tmp is being kfree'd twice,once in the > "aalg_desc->uinfo.auth.icv_fullbits / 8 != crypto_aead_authsize(aead)" call > to "free_key",twice When "crypto_aead_setauthsize(aead, > x->aalg->alg_trunc_len / 8)" fails call to again "free_key

[PATCH] net: esp4: Fix double free on esp4 functions

2019-01-30 Thread Ramin Farajpour Cami
key/tmp is being kfree'd twice,once in the "aalg_desc->uinfo.auth.icv_fullbits / 8 != crypto_aead_authsize(aead)" call to "free_key",twice When "crypto_aead_setauthsize(aead, x->aalg->alg_trunc_len / 8)" fails call to again "free_key", Signed-off-by: Ramin Farajpour Cami --- net/ipv4/esp4.c |