2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-28 23:23:55 +08:00
linux-next/net/mctp
Tom Rix 7e5b6a5c8c mctp: fix use after free
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: 4f9e1ba6de ("mctp: Add tracepoints for tag/key handling")
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-02-15 14:54:40 +00:00
..
test mctp: test: zero out sockaddr 2022-01-11 20:26:36 -08:00
af_mctp.c mctp: remove unnecessary check before calling kfree_skb() 2021-11-30 18:09:23 -08:00
device.c mctp: emit RTM_NEWADDR and RTM_DELADDR 2021-12-20 18:40:48 -08:00
Kconfig mctp: Add flow extension to skb 2021-10-29 13:23:51 +01:00
Makefile mctp: Add test utils 2021-10-03 14:35:41 +01:00
neigh.c mctp: Remove only static neighbour on RTM_DELNEIGH 2022-01-02 12:18:14 +00:00
route.c mctp: fix use after free 2022-02-15 14:54:40 +00:00