Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 541540 (CVE-2014-3619) - <sys-cluster/glusterfs-3.5.3: The memories are exhausted quickly when handle the message which has multi fragments in a single record (CVE-2014-3619)
Summary: <sys-cluster/glusterfs-3.5.3: The memories are exhausted quickly when handle ...
Status: RESOLVED FIXED
Alias: CVE-2014-3619
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Security
URL: https://bugzilla.redhat.com/show_bug....
Whiteboard: B3 [noglsa]
Keywords:
: 484016 (view as bug list)
Depends on:
Blocks: CVE-2012-4417 484016 558422
  Show dependency tree
 
Reported: 2015-02-27 17:05 UTC by Agostino Sarubbo
Modified: 2017-02-10 22:48 UTC (History)
2 users (show)

See Also:
Package list:
=sys-cluster/glusterfs-3.6.5
Runtime testing required: ---
stable-bot: sanity-check+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2015-02-27 17:05:30 UTC
From ${URL} :

Description of problem:
    We construct some rpc messages and send it to the IP and port which glusterfsd listens, the memory usage goes up quickly until exhausted

Version-Release number of selected component (if applicable):
    3.3.0, 3.4.1, 3.5.0


Steps to Reproduce:
1. Start glusterfs services, and get the IP and port that one glusterfsd process listens

2. Run the attachement python script, which connects the IP and port and send four bytes 00 00 00 00 to the glusterfsd process

3. Watch the memory usage of the glusterfsd process. It will grow up quickly

Actual results:
   Memory of the glusterfsd process grows up quickly till exhausted

Expected results:
   Glusterfsd just ignores the messages


Additional info:
   The bug seems in __socket_proto_state_machine, which goes into an infinite loop to malloc memories when handle the special message. The special message is "multi fragments in a single record", and some values are not reset when handle next fragment.
  
   We tested below fix and it seems work:
          if (!RPC_LASTFRAG (in->fraghdr)) {
 
+             in->pending_vector = in->vector;
+             in->pending_vector->iov_base =  &in->fraghdr;
+             in->pending_vector->iov_len  = sizeof (in->fraghdr);
              in->record_state = SP_STATE_READING_FRAGHDR;
              break;
           }


@maintainer(s): after the bump, in case we need to stabilize the package, please let us know if it is ready for the stabilization or not.
Comment 1 Ultrabug gentoo-dev 2015-03-23 12:15:12 UTC
Ok ago, I dropped all 3.4 versions from tree and bumped 3.5.3 which is not vulnerable.


+*glusterfs-3.5.3 (23 Mar 2015)
+
+  23 Mar 2015; Ultrabug <ultrabug@gentoo.org> -glusterfs-3.3.0.ebuild,
+  -glusterfs-3.4.2-r1.ebuild, -glusterfs-3.4.4.ebuild,
+  -glusterfs-3.4.4-r2.ebuild, -glusterfs-3.5.1.ebuild, -glusterfs-3.5.2.ebuild,
+  +glusterfs-3.5.3.ebuild, +files/glusterd-r2.initd:
+  version bump, drop old and vulnerable wrt #541540, fix #536606 thx to Jaco
+  Kroon, fix #529676 thx to Christian Affolter
+
Comment 2 GLSAMaker/CVETool Bot gentoo-dev 2015-06-17 17:50:10 UTC
CVE-2014-3619 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2014-3619):
  The __socket_proto_state_machine function in GlusterFS 3.5 allows remote
  attackers to cause a denial of service (infinite loop) via a "00000000"
  fragment header.
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2016-11-22 16:36:25 UTC
@ Arches,

please test and mark stable: =sys-cluster/glusterfs-3.6.5
Comment 4 Agostino Sarubbo gentoo-dev 2016-11-25 18:28:47 UTC
amd64 stable
Comment 5 Agostino Sarubbo gentoo-dev 2016-11-25 18:55:36 UTC
x86 stable
Comment 6 Ultrabug gentoo-dev 2016-11-27 14:59:39 UTC
*** Bug 484016 has been marked as a duplicate of this bug. ***
Comment 7 Agostino Sarubbo gentoo-dev 2017-01-15 15:51:26 UTC
ppc stable
Comment 8 Agostino Sarubbo gentoo-dev 2017-01-18 10:03:55 UTC
ppc64 stable.

Maintainer(s), please cleanup.
Security, please vote.
Comment 9 Thomas Deutschmann (RETIRED) gentoo-dev 2017-01-30 01:36:19 UTC
GLSA Vote: No


@ Maintainer(s): Please cleanup and drop =sys-cluster/glusterfs-3.1.2!
Comment 10 Ultrabug gentoo-dev 2017-02-10 13:04:55 UTC
Cleanup done
Comment 11 Thomas Deutschmann (RETIRED) gentoo-dev 2017-02-10 22:48:00 UTC
All done, repository is clean.