Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9a4e70f authored by Vlad Tsyrklevich's avatar Vlad Tsyrklevich Committed by Greg Kroah-Hartman
Browse files

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: default avatarVlad Tsyrklevich <vlad@tsyrklevich.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e3a252a9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;