]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
amt: fix possible memory leak in amt_rcv()
authorTaehee Yoo <ap420073@gmail.com>
Mon, 23 May 2022 16:17:08 +0000 (16:17 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:41:20 +0000 (18:41 +0200)
commit60d9c020c69977e138727b3577bc6a0458325e9c
treed3e0c17a015a15064f60ebd64c6a4277fa908dcb
parentec6feb113abe511bbe054e8c47e2c94b6b961f94
amt: fix possible memory leak in amt_rcv()

[ Upstream commit 1a1a0e80e005cbdc2c250fc858e1d8570f4e4acb ]

If an amt receives packets and it finds socket.
If it can't find a socket, it should free a received skb.
But it doesn't.
So, a memory leak would possibly occur.

Fixes: cbc21dc1cfe9 ("amt: add data plane of amt interface")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/amt.c