Bug 1017746 - gf_string2bytesize should check for overflow
Summary: gf_string2bytesize should check for overflow
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: core
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kaushal
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-10 12:38 UTC by Kaushal
Modified: 2014-04-17 11:49 UTC (History)
1 user (show)

Fixed In Version: glusterfs-3.5.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-17 11:49:25 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.