Bug 1626346 - dht: Use snprintf in dht_filter_loc_subvol_key
Summary: dht: Use snprintf in dht_filter_loc_subvol_key
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: distribute
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nithya Balachandran
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-07 06:07 UTC by Nithya Balachandran
Modified: 2018-10-23 15:19 UTC (History)
1 user (show)

Fixed In Version: glusterfs-5.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-23 15:19:00 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Nithya Balachandran 2018-09-07 06:07:38 UTC
Description of problem:

The recent changes to use malloc instead of calloc left the strings new_name and new_path non-null terminated because they were initialised using strncpy.

Use snprintf instead to make sure they are NULL terminated.


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-09-07 06:15:00 UTC
REVIEW: https://review.gluster.org/21112 (dht: Use snprintf instead of strncpy) posted (#1) for review on master by N Balachandran

Comment 2 Worker Ant 2018-09-12 06:26:15 UTC
COMMIT: https://review.gluster.org/21112 committed in master by "Amar Tumballi" <amarts> with a commit message- dht: Use snprintf instead of strncpy

The recent changes to use malloc instead
of calloc left the new_name and new_path
non-null terminated. We now use snprintf
instead of strncpy to fix this.

Change-Id: I1a31701ca9447efde38921be0ba2c73cde2e7976
fixes: bz#1626346
Signed-off-by: N Balachandran <nbalacha>

Comment 3 Shyamsundar 2018-10-23 15:19:00 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.