diff options
author | Colin Ian King <colin.king@canonical.com> | 2017-08-18 00:14:58 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-19 01:21:51 +0200 |
commit | b024d949a3c24255a7ef1a470420eb478949aa4c (patch) | |
tree | 9b66d1d97db2e83f862ce392422899e596b6f0a2 /net/irda | |
parent | net/mlx4_core: Enable 4K UAR if SRIOV module parameter is not enabled (diff) | |
download | linux-b024d949a3c24255a7ef1a470420eb478949aa4c.tar.xz linux-b024d949a3c24255a7ef1a470420eb478949aa4c.zip |
irda: do not leak initialized list.dev to userspace
list.dev has not been initialized and so the copy_to_user is copying
data from the stack back to user space which is a potential
information leak. Fix this ensuring all of list is initialized to
zero.
Detected by CoverityScan, CID#1357894 ("Uninitialized scalar variable")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda')
-rw-r--r-- | net/irda/af_irda.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index 2e6990f8b80b..23fa7c8b09a5 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c @@ -2213,7 +2213,7 @@ static int irda_getsockopt(struct socket *sock, int level, int optname, { struct sock *sk = sock->sk; struct irda_sock *self = irda_sk(sk); - struct irda_device_list list; + struct irda_device_list list = { 0 }; struct irda_device_info *discoveries; struct irda_ias_set * ias_opt; /* IAS get/query params */ struct ias_object * ias_obj; /* Object in IAS */ |