* [PATCH] net/appletalk: Fix kernel memory disclosure
@ 2017-01-09 13:57 Vlad Tsyrklevich
2017-01-09 21:38 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Vlad Tsyrklevich @ 2017-01-09 13:57 UTC (permalink / raw)
To: acme; +Cc: netdev, Vlad Tsyrklevich
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>
---
drivers/net/appletalk/ipddp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/appletalk/ipddp.c b/drivers/net/appletalk/ipddp.c
index b8c2933..a306de4 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;
--
2.7.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-09 21:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-09 13:57 [PATCH] net/appletalk: Fix kernel memory disclosure Vlad Tsyrklevich
2017-01-09 21:38 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).