[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9f042114f8ac89a59dca9759f3e866de41fcf811.camel@codeconstruct.com.au>
Date: Tue, 15 Feb 2022 10:26:19 +0800
From: Jeremy Kerr <jk@...econstruct.com.au>
To: trix@...hat.com, matt@...econstruct.com.au, davem@...emloft.net,
kuba@...nel.org, nathan@...nel.org, ndesaulniers@...gle.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev
Subject: Re: [PATCH v2] mctp: fix use after free
Hi Tom,
> Clang static analysis reports this problem
> route.c:425:4: warning: Use of memory after it is freed
> trace_mctp_key_acquire(key);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> When mctp_key_add() fails, key is freed but then is later
> used in trace_mctp_key_acquire(). Add an else statement
> to use the key only when mctp_key_add() is successful.
>
> Fixes: 4f9e1ba6de45 ("mctp: Add tracepoints for tag/key handling")
> Signed-off-by: Tom Rix <trix@...hat.com>
> ---
> v2: change the Fixes: line
Super, thanks!
Acked-off-by: Jeremy Kerr <jk@...econstruct.com.au>
Cheers,
Jeremy
Powered by blists - more mailing lists