Bug #18527
entity_addr_t comparison uses memcmp improperly (endianness bug across the wire)
Status:
New
Priority:
Normal
Assignee:
-
Category:
Correctness/Safety
Target version:
-
% Done:
0%
Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
We use a memcmp on the entity_addr_t object for its comparator, and we use that in resolving connection races within the messenger.
However, because memcmp does a byte-by-byte comparison, this can return different results if run on big-endian and little-endian architectures! That would be bad. It needs to be fixed reliably, but that will require a protocol revision or feature bit or something to make sure it's safe. (Hat-tip to Sam for noticing this by inspection while searching for another bug!)
History
#1 Updated by Greg Farnum almost 7 years ago
- Project changed from Ceph to RADOS
- Subject changed from entity_addr_t comparison uses memcmp improperly to entity_addr_t comparison uses memcmp improperly (endianness bug across the wire)
- Category changed from msgr to Correctness/Safety