summaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
authorKulikov Vasiliy <segooon@gmail.com>2010-10-29 23:04:33 +0000
committerDavid S. Miller <davem@davemloft.net>2010-10-30 16:49:38 -0700
commitce384d91cd7a4269a1ed5d4307a70aa4c6fa14f2 (patch)
treedad07ece7f32cfa73cfe3bf4e31f04c9a4b9a5ef /drivers/isdn
parent3e9ebd3cf48d9181e0931c6fd8f1a7dc4d6cb27c (diff)
downloadop-kernel-dev-ce384d91cd7a4269a1ed5d4307a70aa4c6fa14f2.zip
op-kernel-dev-ce384d91cd7a4269a1ed5d4307a70aa4c6fa14f2.tar.gz
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 <segooon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/mISDN/socket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c
index 3232206..7446d8b 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();
OpenPOWER on IntegriCloud