stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "cifs_dbg() outputs an uninitialized buffer in cifs_readdir()" has been added to the 3.14-stable tree
@ 2016-02-24  3:23 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-02-24  3:23 UTC (permalink / raw)
  To: vvs, gregkh, sfrench; +Cc: stable, stable-commits


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 3.14-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-3.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 01b9b0b28626db4a47d7f48744d70abca9914ef1 Mon Sep 17 00:00:00 2001
From: Vasily Averin <vvs@virtuozzo.com>
Date: Thu, 14 Jan 2016 13:41:14 +0300
Subject: cifs_dbg() outputs an uninitialized buffer in cifs_readdir()

From: Vasily Averin <vvs@virtuozzo.com>

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 <vvs@virtuozzo.com>
Signed-off-by: Steve French <sfrench@localhost.localdomain>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/cifs/readdir.c |    1 +
 1 file changed, 1 insertion(+)

--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -849,6 +849,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-3.14/cifs_dbg-outputs-an-uninitialized-buffer-in-cifs_readdir.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-02-24  3:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-24  3:23 Patch "cifs_dbg() outputs an uninitialized buffer in cifs_readdir()" has been added to the 3.14-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).