Bug 763926 (GLUSTER-2194) - gluster peer probe on a ip octet value bigger than 255 has no validation
Summary: gluster peer probe on a ip octet value bigger than 255 has no validation
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-2194
Product: GlusterFS
Classification: Community
Component: cli
Version: 3.1.1
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: shishir gowda
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-06 16:59 UTC by Harshavardhana
Modified: 2015-12-01 16:45 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Harshavardhana 2010-12-06 16:59:15 UTC
eg:- gluster peer probe 10.1.10.300 results in glusterd hang. 

Messages in /var/log/glusterfs/etc-glusterfs-glusterd.vol.log are about DNS resolution (Name or service not known). 

And this request goes into an infinite loop until the glusterd is killed and restarted. 

We need a validation routine for checking ipv4 octets. I am surprised to see that there is no validation for this, before even going into DNS resolution. 

Strange part is it even lists that in "gluster peer status" as disconnected and you can't even detach it and says it is part of the cluster.

Comment 1 Harshavardhana 2011-01-26 22:37:13 UTC
(In reply to comment #0)
> eg:- gluster peer probe 10.1.10.300 results in glusterd hang. 
> 
> Messages in /var/log/glusterfs/etc-glusterfs-glusterd.vol.log are about DNS
> resolution (Name or service not known). 
> 


Is there any more input needed on this to move this forward?

Comment 2 kaushik 2011-01-27 04:02:15 UTC
> Is there any more input needed on this to move this forward?

No, waiting for the patches from bug 763981 to move in before pushing in the changes. The above said patches moves the host-name validation/ ip-addr validation to libglusterfs.

Comment 3 shishir gowda 2011-02-18 04:08:51 UTC
Have added the fix the check if peer ip/hostname are valid as part of peer probe command. 
If the octet is > 255, it will be treated as a valid hostname, even though it wont be a valid ipv4 address.

Valid range for hostname:
ASCII chars : 'a' to 'z', '0' to '9', '.', '-', with max of 255 chars.

Comment 4 Anand Avati 2011-02-22 07:11:00 UTC
PATCH: http://patches.gluster.com/patch/6210 in master (Validate peer probe command's hostname/ip address.)

Comment 5 Raghavendra Bhat 2011-02-23 05:38:52 UTC
As shishir has mentioned wrong IP address can be a valid hostname. If invalid hostname is given then it gives out the usage.



gluster peer probe opo_opo
Usage: peer probe <HOSTNAME>


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