summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Tsyrklevich <vlad@tsyrklevich.net>2017-01-09 20:57:48 +0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-09 18:42:42 +0100
commit1bb50d02a8d3161947d213e9627a1a98fea60ac1 (patch)
tree9fb3ebddba1cf6047abf6fd07b5d91461714960d
parentc73b58cfa83e6aac20f075fe1d9d94047da80a25 (diff)
downloadlinux-stable-1bb50d02a8d3161947d213e9627a1a98fea60ac1.tar.gz
linux-stable-1bb50d02a8d3161947d213e9627a1a98fea60ac1.tar.bz2
linux-stable-1bb50d02a8d3161947d213e9627a1a98fea60ac1.zip
net/appletalk: Fix kernel memory disclosure
[ Upstream commit ce7e40c432ba84da104438f6799d460a4cad41bc ] ipddp_route structs contain alignment padding so kernel heap memory is leaked when they are copied to user space in ipddp_ioctl(SIOCFINDIPDDPRT). Change kmalloc() to kzalloc() to clear that memory. Signed-off-by: Vlad Tsyrklevich <vlad@tsyrklevich.net> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/appletalk/ipddp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/appletalk/ipddp.c b/drivers/net/appletalk/ipddp.c
index e90c6a7333d7..2e4649655181 100644
--- a/drivers/net/appletalk/ipddp.c
+++ b/drivers/net/appletalk/ipddp.c
@@ -191,7 +191,7 @@ static netdev_tx_t ipddp_xmit(struct sk_buff *skb, struct net_device *dev)
*/
static int ipddp_create(struct ipddp_route *new_rt)
{
- struct ipddp_route *rt = kmalloc(sizeof(*rt), GFP_KERNEL);
+ struct ipddp_route *rt = kzalloc(sizeof(*rt), GFP_KERNEL);
if (rt == NULL)
return -ENOMEM;