From: Kulikov Vasiliy Date: Fri, 29 Oct 2010 23:04:33 +0000 (+0000) Subject: isdn: mISDN: socket: fix information leak to userland X-Git-Tag: firefly_0821_release~7613^2~3442^2~83 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ce384d91cd7a4269a1ed5d4307a70aa4c6fa14f2;p=firefly-linux-kernel-4.4.55.git isdn: mISDN: socket: fix information leak to userland Structure mISDN_devinfo is copied to userland with the field "name" that has the last elements unitialized. It leads to leaking of contents of kernel stack memory. Signed-off-by: Vasiliy Kulikov Signed-off-by: David S. Miller --- diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c index 3232206406b1..7446d8b4282d 100644 --- a/drivers/isdn/mISDN/socket.c +++ b/drivers/isdn/mISDN/socket.c @@ -392,6 +392,7 @@ data_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) if (dev) { struct mISDN_devinfo di; + memset(&di, 0, sizeof(di)); di.id = dev->id; di.Dprotocols = dev->Dprotocols; di.Bprotocols = dev->Bprotocols | get_all_Bprotocols(); @@ -672,6 +673,7 @@ base_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) if (dev) { struct mISDN_devinfo di; + memset(&di, 0, sizeof(di)); di.id = dev->id; di.Dprotocols = dev->Dprotocols; di.Bprotocols = dev->Bprotocols | get_all_Bprotocols();