[Bugs] [Bug 1499892] md-cache: xattr values should not be checked with string functions
bugzilla at redhat.com
bugzilla at redhat.com
Thu Nov 9 09:07:30 UTC 2017
https://bugzilla.redhat.com/show_bug.cgi?id=1499892
--- Comment #2 from Worker Ant <bugzilla-bot at gluster.org> ---
COMMIT: https://review.gluster.org/18459 committed in release-3.12 by
------------- 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 at samba.org>
> Pair-Programmed-With: Michael Adam <obnox at samba.org>
> Change-Id: If723c465a630b8a37b6be58782a2724df7ac6b11
> BUG: 1476324
> Reviewed-on: https://review.gluster.org/17910
> Reviewed-by: Michael Adam <obnox at samba.org>
> Smoke: Gluster Build System <jenkins at build.gluster.org>
> Reviewed-by: Poornima G <pgurusid at redhat.com>
> Tested-by: Poornima G <pgurusid at redhat.com>
> CentOS-regression: Gluster Build System <jenkins at build.gluster.org>
> (cherry picked from commit ab4ffdac9dec1867f2d9b33242179cf2b347319d)
Change-Id: If723c465a630b8a37b6be58782a2724df7ac6b11
BUG: 1499892
Signed-off-by: Günther Deschner <gd at samba.org>
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=XZVF0qHjsv&a=cc_unsubscribe
More information about the Bugs
mailing list