]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: Fix memory leak of aead algorithm name
authorIlan Tayari <ilant@mellanox.com>
Sun, 18 Sep 2016 07:42:53 +0000 (07:42 +0000)
committerSteffen Klassert <steffen.klassert@secunet.com>
Mon, 19 Sep 2016 10:08:58 +0000 (12:08 +0200)
commit5d0d41954b3092346c652e7f9783d7a9623e588e
treedbf7ad4ec9e4c8968d6119cfd8433821248a40ab
parent25a52535f7c235ea0f2a3166ac76e7aa9358d90e
xfrm: Fix memory leak of aead algorithm name

commit e98f656bbdfe ("[IPSEC]: Add support for combined mode algorithms")
introduced aead. The function attach_aead kmemdup()s the algorithm
name during xfrm_state_construct().
However this memory is never freed.
Implementation has since been slightly modified in
commit 52031b035632 ("xfrm: Clone states properly on migration")
without resolving this leak.
This patch adds a kfree() call for the aead algorithm name.

Fixes: e98f656bbdfe ("[IPSEC]: Add support for combined mode algorithms")
Signed-off-by: Ilan Tayari <ilant@mellanox.com>
Acked-by: Rami Rosen <roszenrami@gmail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_state.c