Bug 1602121 - avoid possible glusterd crash in glusterd_verify_slave
Summary: avoid possible glusterd crash in glusterd_verify_slave
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: geo-replication
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sunny Kumar
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1611115
TreeView+ depends on / blocked
 
Reported: 2018-07-17 20:29 UTC by Sunny Kumar
Modified: 2018-10-23 15:14 UTC (History)
1 user (show)

Fixed In Version: glusterfs-5.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1611115 (view as bug list)
Environment:
Last Closed: 2018-10-23 15:14:52 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Sunny Kumar 2018-07-17 20:29:06 UTC
Description of problem:
In 'glusterd_verify_slave' while  tokenizing error message we call 'strtok_r' and store return value in 'tmp' which can be NULL. We are passing this 'tmp' as 1st argument to 'strcmp' which will lead to segmentation fault.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Worker Ant 2018-07-17 20:37:16 UTC
REVIEW: https://review.gluster.org/20526 (geo-rep : fix possible crash) posted (#1) for review on master by Sunny Kumar

Comment 2 Worker Ant 2018-07-23 03:57:29 UTC
COMMIT: https://review.gluster.org/20526 committed in master by "Amar Tumballi" <amarts> with a commit message- geo-rep : fix possible crash

Problem : In 'glusterd_verify_slave' while tokenizing error message
          we call 'strtok_r' and store return value in 'tmp' which
          can be NULL. We are passing this 'tmp' as 1st argument to
          'strcmp' which will lead to segmentation fault.
Solution : before calling 'strcmp' we should NULL check 'tmp'.

Change-Id: Ifd3864b904afe6cd09d9e5a4b55c6d0578e22b9d
fixes: bz#1602121
Signed-off-by: Sunny Kumar <sunkumar>

Comment 3 Shyamsundar 2018-10-23 15:14:52 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-5.0, please open a new bug report.

glusterfs-5.0 has been announced on the Gluster mailinglists [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] https://lists.gluster.org/pipermail/announce/2018-October/000115.html
[2] https://www.gluster.org/pipermail/gluster-users/


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