Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69e12f86 authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman
Browse files

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: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8621be05
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2251,7 +2251,7 @@ static int irda_getsockopt(struct socket *sock, int level, int optname,
{
{
	struct sock *sk = sock->sk;
	struct sock *sk = sock->sk;
	struct irda_sock *self = irda_sk(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_device_info *discoveries;
	struct irda_ias_set *	ias_opt;	/* IAS get/query params */
	struct irda_ias_set *	ias_opt;	/* IAS get/query params */
	struct ias_object *	ias_obj;	/* Object in IAS */
	struct ias_object *	ias_obj;	/* Object in IAS */