irda: do not leak initialized list.dev to userspace
authorColin Ian King <colin.king@canonical.com>
Thu, 17 Aug 2017 22:14:58 +0000 (23:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Aug 2017 08:21:42 +0000 (10:21 +0200)
commitf3f5bf2755c75d43930aab28f1affd0602e6fd27
treeeb1c30d7325489e36dbc5265ab3eee5fcc616298
parent19f433a9ce9d37ff3817b67dd6d8cb7a504aef62
irda: do not leak initialized list.dev to userspace

[ Upstream commit b024d949a3c24255a7ef1a470420eb478949aa4c ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/irda/af_irda.c