Project

General

Profile

Bug #18527

entity_addr_t comparison uses memcmp improperly (endianness bug across the wire)

Added by Greg Farnum over 2 years ago. Updated about 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Correctness/Safety
Target version:
-
Start date:
01/13/2017
Due date:
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:

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 about 2 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

Also available in: Atom PDF