<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>113747</bug_id>
          
          <creation_ts>2005-11-27 14:30 0000</creation_ts>
          <short_desc>Bump sys-fs/fuse to 2.4.2, please</short_desc>
          <delta_ts>2005-12-03 16:08:21 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>radek@podgorny.cz</reporter>
          <assigned_to>genstef@gentoo.org</assigned_to>
          <cc>pete4abw@comcast.net</cc>

      

      
          <long_desc isprivate="0">
            <who>radek@podgorny.cz</who>
            <bug_when>2005-11-27 14:30:09 0000</bug_when>
            <thetext>...as it fixes some security bugs.

Thanks...</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2005-11-27 14:38:04 0000</bug_when>
            <thetext>This is already fixed in 2.4.1-r1 (Bug 112902)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pete4abw@comcast.net</who>
            <bug_when>2005-12-03 15:06:31 0000</bug_when>
            <thetext>You may wish to include this patch which fixes a bad memory leak then. And 2.4.2
IS a new release not included in 2.4.1-r1.

From fuse-devel newsgroup by author, Miklos Szeredi

Index: lib/fuse.c
===================================================================
RCS file: /cvsroot/fuse/fuse/lib/fuse.c,v
retrieving revision 1.148
diff -u -r1.148 fuse.c
--- lib/fuse.c	28 Nov 2005 16:02:27 -0000	1.148
+++ lib/fuse.c	2 Dec 2005 11:00:31 -0000
@@ -1742,6 +1742,7 @@
 void fuse_process_cmd(struct fuse *f, struct fuse_cmd *cmd)
 {
     fuse_session_process(f-&gt;se, cmd-&gt;buf, cmd-&gt;buflen, cmd-&gt;ch);
+    free_cmd(cmd);
 }
 
 int fuse_exited(struct fuse *f)
@@ -1779,6 +1780,8 @@
         int res = fuse_chan_receive(ch, cmd-&gt;buf, bufsize);
         if (res &lt;= 0) {
             free_cmd(cmd);
+            if (res == -1)
+                fuse_exit(f);
             return NULL;
         }
         cmd-&gt;buflen = res;

This is a bad one. Line #s against 2.4.1 are very different though. See functions:

void fuse_process_cmd (diff begins at line 1656)
struct fuse_cmd *fuse_read_cmd (diff begins at line 1693)

I strongly recommend upgrading to 2.4.2 and modifying the above patch to repair
the leak.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pete4abw@comcast.net</who>
            <bug_when>2005-12-03 15:33:31 0000</bug_when>
            <thetext>Created an attachment (id=74016)
fuse-2.4.1.patch

fix memory leak</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pete4abw@comcast.net</who>
            <bug_when>2005-12-03 15:34:43 0000</bug_when>
            <thetext>Created an attachment (id=74017)
fuse-2.4.2.patch

fix memory leak. I strongly recommend implementing 2.4.2. Lots of changes. In
addition, I also suggest having a cvs version as is done with enlightenment.
Have a version 2.4.9999 which will pull in cvs for this series on demand by
user.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>genstef@gentoo.org</who>
            <bug_when>2005-12-03 16:08:21 0000</bug_when>
            <thetext>Thanks, fixed</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>74016</attachid>
            <date>2005-12-03 15:33 0000</date>
            <desc>fuse-2.4.1.patch</desc>
            <filename>fuse-2.4.1.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIC90bXAvZnVzZS5jLjIuNC4xCTIwMDUtMTItMDMgMTg6MjY6NTMuMDAwMDAwMDAwIC0wNTAw
CisrKyAvdG1wL2Z1c2UuYy4yLjQuMS5wYXRjaAkyMDA1LTEyLTAzIDE4OjI2OjUzLjAwMDAwMDAw
MCAtMDUwMApAQCAtMTY0Nyw2ICsxNjQ3LDcgQEAKIHZvaWQgZnVzZV9wcm9jZXNzX2NtZChzdHJ1
Y3QgZnVzZSAqZiwgc3RydWN0IGZ1c2VfY21kICpjbWQpCiB7CiAgICAgZnVzZV9zZXNzaW9uX3By
b2Nlc3MoZi0+c2UsIGNtZC0+YnVmLCBjbWQtPmJ1ZmxlbiwgY21kLT5jaCk7CisgICAgZnJlZShj
bWQpOwogfQogCiBpbnQgZnVzZV9leGl0ZWQoc3RydWN0IGZ1c2UgKmYpCkBAIC0xNjg0LDYgKzE2
ODUsOCBAQAogICAgICAgICBpbnQgcmVzID0gZnVzZV9jaGFuX3JlY2VpdmUoY2gsIGNtZC0+YnVm
LCBidWZzaXplKTsKICAgICAgICAgaWYgKHJlcyA8PSAwKSB7CiAgICAgICAgICAgICBmcmVlX2Nt
ZChjbWQpOworCSAgICBpZiAocmVzID09IC0xKQorCQlmdXNlX2V4aXQoZik7CiAgICAgICAgICAg
ICByZXR1cm4gTlVMTDsKICAgICAgICAgfQogICAgICAgICBjbWQtPmJ1ZmxlbiA9IHJlczsKCg==
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>74017</attachid>
            <date>2005-12-03 15:34 0000</date>
            <desc>fuse-2.4.2.patch</desc>
            <filename>fuse-2.4.2.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIC90bXAvZnVzZS5jLjIuNC4yCTIwMDUtMTItMDMgMTg6MTk6MzMuMDAwMDAwMDAwIC0wNTAw
CisrKyAvdG1wL2Z1c2UuYy4yLjQuMi5wYXRjaGVkCTIwMDUtMTItMDMgMTg6MTk6MzMuMDAwMDAw
MDAwIC0wNTAwCkBAIC0xNjU2LDYgKzE2NTYsNyBAQAogdm9pZCBmdXNlX3Byb2Nlc3NfY21kKHN0
cnVjdCBmdXNlICpmLCBzdHJ1Y3QgZnVzZV9jbWQgKmNtZCkKIHsKICAgICBmdXNlX3Nlc3Npb25f
cHJvY2VzcyhmLT5zZSwgY21kLT5idWYsIGNtZC0+YnVmbGVuLCBjbWQtPmNoKTsKKyAgICBmcmVl
X2NtZChjbWQpOwogfQogCiBpbnQgZnVzZV9leGl0ZWQoc3RydWN0IGZ1c2UgKmYpCkBAIC0xNjkz
LDYgKzE2OTQsOCBAQAogICAgICAgICBpbnQgcmVzID0gZnVzZV9jaGFuX3JlY2VpdmUoY2gsIGNt
ZC0+YnVmLCBidWZzaXplKTsKICAgICAgICAgaWYgKHJlcyA8PSAwKSB7CiAgICAgICAgICAgICBm
cmVlX2NtZChjbWQpOworCSAgICBpZiAocmVzID09IC0xKQorCQlmdXNlX2V4aXQoZik7CiAgICAg
ICAgICAgICByZXR1cm4gTlVMTDsKICAgICAgICAgfQogICAgICAgICBjbWQtPmJ1ZmxlbiA9IHJl
czsKCg==
</data>        

          </attachment>
    </bug>

</bugzilla>