From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:46446 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754177AbdHYApj (ORCPT ); Thu, 24 Aug 2017 20:45:39 -0400 Subject: Patch "irda: do not leak initialized list.dev to userspace" has been added to the 4.12-stable tree To: colin.king@canonical.com, davem@davemloft.net, gregkh@linuxfoundation.org Cc: , From: Date: Thu, 24 Aug 2017 17:44:41 -0700 Message-ID: <1503621881118164@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled irda: do not leak initialized list.dev to userspace to the 4.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: irda-do-not-leak-initialized-list.dev-to-userspace.patch and it can be found in the queue-4.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Thu Aug 24 17:43:45 PDT 2017 From: Colin Ian King Date: Thu, 17 Aug 2017 23:14:58 +0100 Subject: irda: do not leak initialized list.dev to userspace From: Colin Ian King [ 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/irda/af_irda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c @@ -2225,7 +2225,7 @@ static int irda_getsockopt(struct socket { 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 */ Patches currently in stable-queue which might be from colin.king@canonical.com are queue-4.12/nfp-fix-infinite-loop-on-umapping-cleanup.patch queue-4.12/irda-do-not-leak-initialized-list.dev-to-userspace.patch