From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:50156 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756116AbcBXDoN (ORCPT ); Tue, 23 Feb 2016 22:44:13 -0500 Subject: Patch "cifs_dbg() outputs an uninitialized buffer in cifs_readdir()" has been added to the 4.4-stable tree To: vvs@virtuozzo.com, gregkh@linuxfoundation.org, sfrench@localhost.localdomain Cc: , From: Date: Tue, 23 Feb 2016 19:24:18 -0800 Message-ID: <145628425822629@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 cifs_dbg() outputs an uninitialized buffer in cifs_readdir() to the 4.4-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: cifs_dbg-outputs-an-uninitialized-buffer-in-cifs_readdir.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 01b9b0b28626db4a47d7f48744d70abca9914ef1 Mon Sep 17 00:00:00 2001 From: Vasily Averin Date: Thu, 14 Jan 2016 13:41:14 +0300 Subject: cifs_dbg() outputs an uninitialized buffer in cifs_readdir() From: Vasily Averin commit 01b9b0b28626db4a47d7f48744d70abca9914ef1 upstream. In some cases tmp_bug can be not filled in cifs_filldir and stay uninitialized, therefore its printk with "%s" modifier can leak content of kernelspace memory. If old content of this buffer does not contain '\0' access bejond end of allocated object can crash the host. Signed-off-by: Vasily Averin Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman --- fs/cifs/readdir.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c @@ -847,6 +847,7 @@ int cifs_readdir(struct file *file, stru * if buggy server returns . and .. late do we want to * check for that here? */ + *tmp_buf = 0; rc = cifs_filldir(current_entry, file, ctx, tmp_buf, max_len); if (rc) { Patches currently in stable-queue which might be from vvs@virtuozzo.com are queue-4.4/cifs_dbg-outputs-an-uninitialized-buffer-in-cifs_readdir.patch