提交 ce7e40c4 编写于 作者: V Vlad Tsyrklevich 提交者: David S. Miller

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: NVlad Tsyrklevich <vlad@tsyrklevich.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b007f090
...@@ -190,7 +190,7 @@ static netdev_tx_t ipddp_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -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) 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) if (rt == NULL)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部