Bug 1476324
| Summary: | md-cache: xattr values should not be checked with string functions | |||
|---|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | Guenther Deschner <gdeschner> | |
| Component: | md-cache | Assignee: | Guenther Deschner <gdeschner> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | ||
| Severity: | unspecified | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | mainline | CC: | anoopcs, bugs | |
| Target Milestone: | --- | |||
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | glusterfs-3.13.0 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1499892 1499893 (view as bug list) | Environment: | ||
| Last Closed: | 2017-12-07 05:50:51 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: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1499892, 1499893 | |||
|
Description
Guenther Deschner
2017-07-28 15:56:47 UTC
REVIEW: https://review.gluster.org/17910 (md-cache: avoid checking the xattr value buffer with string functions.) posted (#1) for review on master by Günther Deschner (gd) REVIEW: https://review.gluster.org/17910 (md-cache: avoid checking the xattr value buffer with string functions.) posted (#2) for review on master by Michael Adam (obnox) REVIEW: https://review.gluster.org/17910 (md-cache: avoid checking the xattr value buffer with string functions.) posted (#3) for review on master by Michael Adam (obnox) COMMIT: https://review.gluster.org/17910 committed in master by Jeff Darcy (jeff.us) ------ commit ab4ffdac9dec1867f2d9b33242179cf2b347319d Author: Günther Deschner <gd> Date: Fri Jul 28 13:38:16 2017 +0200 md-cache: avoid checking the xattr value buffer with string functions. xattrs may very well contain binary, non-text data with leading 0 values. Using strcmp for checking empty values is not the appropriate thing to do: In the best case, it might treat a binary xattr value starting with 0 from being cached (and hence also from being reported back with xattr). In the worst case, we might read beyond the end of a data blob that does contain any zero byte. We fix this by checking the length of the data blob and checking the first byte against 0 if the length is one. Signed-off-by: Guenther Deschner <gd> Pair-Programmed-With: Michael Adam <obnox> Change-Id: If723c465a630b8a37b6be58782a2724df7ac6b11 BUG: 1476324 Reviewed-on: https://review.gluster.org/17910 Reviewed-by: Michael Adam <obnox> Smoke: Gluster Build System <jenkins.org> Reviewed-by: Poornima G <pgurusid> Tested-by: Poornima G <pgurusid> CentOS-regression: Gluster Build System <jenkins.org> 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.13.0, please open a new bug report. glusterfs-3.13.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] http://lists.gluster.org/pipermail/announce/2017-December/000087.html [2] https://www.gluster.org/pipermail/gluster-users/ |