diff options
author | Vlad Tsyrklevich <vlad@tsyrklevich.net> | 2017-01-09 16:57:48 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-10 00:34:39 +0300 |
commit | ce7e40c432ba84da104438f6799d460a4cad41bc (patch) | |
tree | 678e2f202c6a78e6a7c7f7e23f4de8bd43f3d3c9 | |
parent | b007f09072ca8afa118ade333e717ba443e8d807 (diff) | |
download | linux-ce7e40c432ba84da104438f6799d460a4cad41bc.tar.xz |
net/appletalk: Fix kernel memory disclosure
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>
-rw-r--r-- | drivers/net/appletalk/ipddp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/appletalk/ipddp.c b/drivers/net/appletalk/ipddp.c index b8c293373ecc..a306de4318d7 100644 --- a/drivers/net/appletalk/ipddp.c +++ b/drivers/net/appletalk/ipddp.c @@ -190,7 +190,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; |