Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1626346

Summary: dht: Use snprintf in dht_filter_loc_subvol_key
Product: [Community] GlusterFS Reporter: Nithya Balachandran <nbalacha>
Component: distributeAssignee: Nithya Balachandran <nbalacha>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-5.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-23 15:19:00 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:
Embargoed:

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/