Bug 1017746

Summary: gf_string2bytesize should check for overflow
Product: [Community] GlusterFS Reporter: Kaushal <kaushal>
Component: coreAssignee: Kaushal <kaushal>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.5.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-17 11:49:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Kaushal 2013-10-10 12:38:18 UTC
Description of problem:
gf_string2bytesize does not check for overflow, before casting the value from double to uint64_t. So, if the value was greater than UINT64_MAX, casting would cause the value to change to 0.

Comment 1 Anand Avati 2013-10-10 12:44:03 UTC
REVIEW: http://review.gluster.org/6068 (libglusterfs: Account for overflow in gf_string2bytesize) posted (#1) for review on master by Kaushal M (kaushal)

Comment 2 Anand Avati 2013-10-17 04:49:52 UTC
REVIEW: http://review.gluster.org/6101 (libglusterfs: Return 'ERANGE' for ASCII string to number system) posted (#1) for review on master by Harshavardhana (harsha)

Comment 3 Anand Avati 2013-10-18 00:05:25 UTC
COMMIT: http://review.gluster.org/6101 committed in master by Anand Avati (avati) 
------
commit 05d8c37c1e1b0554985196d507df3a65c764873b
Author: Harshavardhana <harsha>
Date:   Wed Oct 16 21:24:32 2013 -0700

    libglusterfs: Return 'ERANGE' for ASCII string to number system
    
    Using 'EOVERFLOW' should be limited to data structure
    alignments not Number systems.
    
    Change-Id: I7d337d414e998c0a729c95661df239e36c753a38
    BUG: 1017746
    Signed-off-by: Harshavardhana <harsha>
    Reviewed-on: http://review.gluster.org/6101
    Reviewed-by: Kaushal M <kaushal>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Anand Avati <avati>

Comment 4 Niels de Vos 2014-04-17 11:49:25 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.5.0, please reopen this bug report.

glusterfs-3.5.0 has been announced on the Gluster Developers mailinglist [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/6137
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user