Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Vlad Tsyrklevich and committed by
David S. Miller
ce7e40c4 b007f090

+1 -1
+1 -1
drivers/net/appletalk/ipddp.c
··· 190 190 */ 191 191 static int ipddp_create(struct ipddp_route *new_rt) 192 192 { 193 - struct ipddp_route *rt = kmalloc(sizeof(*rt), GFP_KERNEL); 193 + struct ipddp_route *rt = kzalloc(sizeof(*rt), GFP_KERNEL); 194 194 195 195 if (rt == NULL) 196 196 return -ENOMEM;