Patch "fuse: initialize the flock flag in fuse_file on allocation" has been added to the 3.18-stable tree
Subsystems (2)
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 <[email protected]> know about it.
Quoted 1 line
From
68227c03cba84a24faf8a7277d2b1a03c8959c2cMon Sep 17 00:00:00 2001
From: Mateusz Jurczyk <[email protected]>
Date: Wed, 7 Jun 2017 12:26:49 +0200
Subject: fuse: initialize the flock flag in fuse_file on allocation
From: Mateusz Jurczyk <[email protected]>
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.
--- fs/fuse/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fuse/file.c +1 -1
@@ -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 [email protected] are
queue-3.18/fuse-initialize-the-flock-flag-in-fuse_file-on-allocation.patch