* Patch "fuse: initialize the flock flag in fuse_file on allocation" has been added to the 3.18-stable tree
@ 2017-08-13 22:18 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-08-13 22:18 UTC (permalink / raw)
To: mjurczyk, gregkh, mszeredi; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
fuse: initialize the flock flag in fuse_file on allocation
to the 3.18-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:
fuse-initialize-the-flock-flag-in-fuse_file-on-allocation.patch
and it can be found in the queue-3.18 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 68227c03cba84a24faf8a7277d2b1a03c8959c2c Mon Sep 17 00:00:00 2001
From: Mateusz Jurczyk <mjurczyk@google.com>
Date: Wed, 7 Jun 2017 12:26:49 +0200
Subject: fuse: initialize the flock flag in fuse_file on allocation
From: Mateusz Jurczyk <mjurczyk@google.com>
commit 68227c03cba84a24faf8a7277d2b1a03c8959c2c upstream.
Before the patch, the flock flag could remain uninitialized for the
lifespan of the fuse_file allocation. Unless set to true in
fuse_file_flock(), it would remain in an indeterminate state until read in
an if statement in fuse_release_common(). This could consequently lead to
taking an unexpected branch in the code.
The bug was discovered by a runtime instrumentation designed to detect use
of uninitialized memory in the kernel.
Signed-off-by: Mateusz Jurczyk <mjurczyk@google.com>
Fixes: 37fb3a30b462 ("fuse: fix flock")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/fuse/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -54,7 +54,7 @@ struct fuse_file *fuse_file_alloc(struct
{
struct fuse_file *ff;
- ff = kmalloc(sizeof(struct fuse_file), GFP_KERNEL);
+ ff = kzalloc(sizeof(struct fuse_file), GFP_KERNEL);
if (unlikely(!ff))
return NULL;
Patches currently in stable-queue which might be from mjurczyk@google.com are
queue-3.18/fuse-initialize-the-flock-flag-in-fuse_file-on-allocation.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-08-14 0:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-13 22:18 Patch "fuse: initialize the flock flag in fuse_file on allocation" has been added to the 3.18-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).