<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/fs/fuse, branch linux-4.20.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-4.20.y</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-4.20.y'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2019-02-12T19:02:35+00:00</updated>
<entry>
<title>cuse: fix ioctl</title>
<updated>2019-02-12T19:02:35+00:00</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@redhat.com</email>
</author>
<published>2019-01-16T09:27:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f191c028cc33ca99c766dfafb92bbf1ea0f0f6d4'/>
<id>urn:sha1:f191c028cc33ca99c766dfafb92bbf1ea0f0f6d4</id>
<content type='text'>
commit 8a3177db59cd644fde05ba9efee29392dfdec8aa upstream.

cuse_process_init_reply() doesn't initialize fc-&gt;max_pages and thus all
cuse bases ioctls fail with ENOMEM.

Reported-by: Andreas Steinmetz &lt;ast@domdv.de&gt;
Fixes: 5da784cce430 ("fuse: add max_pages to init_out")
Cc: &lt;stable@vger.kernel.org&gt; # v4.20
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>fuse: handle zero sized retrieve correctly</title>
<updated>2019-02-12T19:02:35+00:00</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@redhat.com</email>
</author>
<published>2019-01-16T09:27:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=725af4227103da18f7c07e4d7fcb00c0dbcb49e9'/>
<id>urn:sha1:725af4227103da18f7c07e4d7fcb00c0dbcb49e9</id>
<content type='text'>
commit 97e1532ef81acb31c30f9e75bf00306c33a77812 upstream.

Dereferencing req-&gt;page_descs[0] will Oops if req-&gt;max_pages is zero.

Reported-by: syzbot+c1e36d30ee3416289cc0@syzkaller.appspotmail.com
Tested-by: syzbot+c1e36d30ee3416289cc0@syzkaller.appspotmail.com
Fixes: b2430d7567a3 ("fuse: add per-page descriptor &lt;offset, length&gt; to fuse_req")
Cc: &lt;stable@vger.kernel.org&gt; # v3.9
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>fuse: decrement NR_WRITEBACK_TEMP on the right page</title>
<updated>2019-02-12T19:02:35+00:00</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@redhat.com</email>
</author>
<published>2019-01-16T09:27:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=598cebebe671be9b894c78eba7e50ca6f824c890'/>
<id>urn:sha1:598cebebe671be9b894c78eba7e50ca6f824c890</id>
<content type='text'>
commit a2ebba824106dabe79937a9f29a875f837e1b6d4 upstream.

NR_WRITEBACK_TEMP is accounted on the temporary page in the request, not
the page cache page.

Fixes: 8b284dc47291 ("fuse: writepages: handle same page rewrites")
Cc: &lt;stable@vger.kernel.org&gt; # v3.13
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>fuse: call pipe_buf_release() under pipe lock</title>
<updated>2019-02-12T19:02:35+00:00</updated>
<author>
<name>Jann Horn</name>
<email>jannh@google.com</email>
</author>
<published>2019-01-12T01:39:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4b10cee464a04a8b3809d400f231f41c0dad3fbd'/>
<id>urn:sha1:4b10cee464a04a8b3809d400f231f41c0dad3fbd</id>
<content type='text'>
commit 9509941e9c534920ccc4771ae70bd6cbbe79df1c upstream.

Some of the pipe_buf_release() handlers seem to assume that the pipe is
locked - in particular, anon_pipe_buf_release() accesses pipe-&gt;tmp_page
without taking any extra locks. From a glance through the callers of
pipe_buf_release(), it looks like FUSE is the only one that calls
pipe_buf_release() without having the pipe locked.

This bug should only lead to a memory leak, nothing terrible.

Fixes: dd3bb14f44a6 ("fuse: support splice() writing to fuse device")
Cc: stable@vger.kernel.org
Signed-off-by: Jann Horn &lt;jannh@google.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>fuse: continue to send FUSE_RELEASEDIR when FUSE_OPEN returns ENOSYS</title>
<updated>2018-12-11T20:47:28+00:00</updated>
<author>
<name>Chad Austin</name>
<email>chadaustin@fb.com</email>
</author>
<published>2018-12-10T18:54:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2e64ff154ce6ce9a8dc0f9556463916efa6ff460'/>
<id>urn:sha1:2e64ff154ce6ce9a8dc0f9556463916efa6ff460</id>
<content type='text'>
When FUSE_OPEN returns ENOSYS, the no_open bit is set on the connection.

Because the FUSE_RELEASE and FUSE_RELEASEDIR paths share code, this
incorrectly caused the FUSE_RELEASEDIR request to be dropped and never sent
to userspace.

Pass an isdir bool to distinguish between FUSE_RELEASE and FUSE_RELEASEDIR
inside of fuse_file_put.

Fixes: 7678ac50615d ("fuse: support clients that don't implement 'open'")
Cc: &lt;stable@vger.kernel.org&gt; # v3.14
Signed-off-by: Chad Austin &lt;chadaustin@fb.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>fuse: Fix memory leak in fuse_dev_free()</title>
<updated>2018-12-10T08:57:54+00:00</updated>
<author>
<name>Takeshi Misawa</name>
<email>jeliantsurux@gmail.com</email>
</author>
<published>2018-12-09T05:30:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d72f70da60de1af4bfd0f0a3d0ecbc28eea07679'/>
<id>urn:sha1:d72f70da60de1af4bfd0f0a3d0ecbc28eea07679</id>
<content type='text'>
When ntfs is unmounted, the following leak is
reported by kmemleak.

kmemleak report:

unreferenced object 0xffff880052bf4400 (size 4096):
  comm "mount.ntfs", pid 16530, jiffies 4294861127 (age 3215.836s)
  hex dump (first 32 bytes):
    00 44 bf 52 00 88 ff ff 00 44 bf 52 00 88 ff ff  .D.R.....D.R....
    10 44 bf 52 00 88 ff ff 10 44 bf 52 00 88 ff ff  .D.R.....D.R....
  backtrace:
    [&lt;00000000bf4a2f8d&gt;] fuse_fill_super+0xb22/0x1da0 [fuse]
    [&lt;000000004dde0f0c&gt;] mount_bdev+0x263/0x320
    [&lt;0000000025aebc66&gt;] mount_fs+0x82/0x2bf
    [&lt;0000000042c5a6be&gt;] vfs_kern_mount.part.33+0xbf/0x480
    [&lt;00000000ed10cd5b&gt;] do_mount+0x3de/0x2ad0
    [&lt;00000000d59ff068&gt;] ksys_mount+0xba/0xd0
    [&lt;000000001bda1bcc&gt;] __x64_sys_mount+0xba/0x150
    [&lt;00000000ebe26304&gt;] do_syscall_64+0x151/0x490
    [&lt;00000000d25f2b42&gt;] entry_SYSCALL_64_after_hwframe+0x44/0xa9
    [&lt;000000002e0abd2c&gt;] 0xffffffffffffffff

fuse_dev_alloc() allocate fud-&gt;pq.processing.
But this hash table is not freed.

Fix this by freeing fud-&gt;pq.processing.

Signed-off-by: Takeshi Misawa &lt;jeliantsurux@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Fixes: be2ff42c5d6e ("fuse: Use hash table to link processing request")
</content>
</entry>
<entry>
<title>fuse: fix revalidation of attributes for permission check</title>
<updated>2018-12-03T09:14:43+00:00</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@redhat.com</email>
</author>
<published>2018-12-03T09:14:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d233c7dd1682437ba4b430b04766aa6eef9aef67'/>
<id>urn:sha1:d233c7dd1682437ba4b430b04766aa6eef9aef67</id>
<content type='text'>
fuse_invalidate_attr() now sets fi-&gt;inval_mask instead of fi-&gt;i_time, hence
we need to check the inval mask in fuse_permission() as well.

Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Fixes: 2f1e81965fd0 ("fuse: allow fine grained attr cache invaldation")
</content>
</entry>
<entry>
<title>fuse: fix fsync on directory</title>
<updated>2018-12-03T09:14:43+00:00</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@redhat.com</email>
</author>
<published>2018-12-03T09:14:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a9c2d1e82fc2937baf43c0d400f0c9e87dcf035d'/>
<id>urn:sha1:a9c2d1e82fc2937baf43c0d400f0c9e87dcf035d</id>
<content type='text'>
Commit ab2257e9941b ("fuse: reduce size of struct fuse_inode") moved parts
of fields related to writeback on regular file and to directory caching
into a union.  However fuse_fsync_common() called from fuse_dir_fsync()
touches some writeback related fields, resulting in a crash.

Move writeback related parts from fuse_fsync_common() to fuse_fysnc().

Reported-by: Brett Girton &lt;btgirton@gmail.com&gt;
Tested-by: Brett Girton &lt;btgirton@gmail.com&gt;
Fixes: ab2257e9941b ("fuse: reduce size of struct fuse_inode")
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>fuse: Add bad inode check in fuse_destroy_inode()</title>
<updated>2018-11-22T09:20:19+00:00</updated>
<author>
<name>Myungho Jung</name>
<email>mhjungk@gmail.com</email>
</author>
<published>2018-11-21T23:18:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4fc4bb796b0c75067fd65292dfd874869ff7c9dc'/>
<id>urn:sha1:4fc4bb796b0c75067fd65292dfd874869ff7c9dc</id>
<content type='text'>
make_bad_inode() sets inode-&gt;i_mode to S_IFREG if I/O error is detected
in fuse_do_getattr()/fuse_do_setattr(). If the inode is not a regular
file, write_files and queued_writes in fuse_inode are not initialized
and have NULL or invalid pointers written by other members in a union.
So, list_empty() returns false in fuse_destroy_inode(). Add
is_bad_inode() to check if make_bad_inode() was called.

Reported-by: syzbot+b9c89b84423073226299@syzkaller.appspotmail.com
Fixes: ab2257e9941b ("fuse: reduce size of struct fuse_inode")
Signed-off-by: Myungho Jung &lt;mhjungk@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>fuse: fix use-after-free in fuse_direct_IO()</title>
<updated>2018-11-09T14:52:17+00:00</updated>
<author>
<name>Lukas Czerner</name>
<email>lczerner@redhat.com</email>
</author>
<published>2018-11-09T13:51:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ebacb81273599555a7a19f7754a1451206a5fc4f'/>
<id>urn:sha1:ebacb81273599555a7a19f7754a1451206a5fc4f</id>
<content type='text'>
In async IO blocking case the additional reference to the io is taken for
it to survive fuse_aio_complete(). In non blocking case this additional
reference is not needed, however we still reference io to figure out
whether to wait for completion or not. This is wrong and will lead to
use-after-free. Fix it by storing blocking information in separate
variable.

This was spotted by KASAN when running generic/208 fstest.

Signed-off-by: Lukas Czerner &lt;lczerner@redhat.com&gt;
Reported-by: Zorro Lang &lt;zlang@redhat.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Fixes: 744742d692e3 ("fuse: Add reference counting for fuse_io_priv")
Cc: &lt;stable@vger.kernel.org&gt; # v4.6
</content>
</entry>
</feed>
