HomeMesosphereNo notifications. 4 unresolved issues.

Protect against garbage mesos versions
ClosedAll Users

Authored by jasongilanfarr on Dec 7 2016, 5:12 PM.

Details

Summary
  • Older versions of libmesos report their version numbers with garbage

data (positive and negative numbers for all of the fields).

This has been fixed in more recent versions including 1.0.2.
Because they have bad version values, we need to protect against that, e.g.
the version numbers are commonly in the billions. So restrict the versions
accepted to be >0 and <100
Test Plan

sbt test, loaded libmesos with a bad version and verified we don't proceed.

Diff Detail

Repository
rMARATHON marathon
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jasongilanfarr retitled this revision from to Protect against garbage mesos versions.Dec 7 2016, 5:12 PM
jasongilanfarr updated this object.
jasongilanfarr edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Dec 7 2016, 5:57 PM
aquamatthias accepted this revision.Dec 7 2016, 7:06 PM
jenkins requested changes to this revision.Dec 7 2016, 9:06 PM
jenkins added a reviewer: jenkins.
This revision now requires changes to proceed.Dec 7 2016, 9:06 PM
jdef added a subscriber: jdef.Dec 7 2016, 9:12 PM
jdef added inline comments.
src/main/scala/mesosphere/mesos/LibMesos.scala
29

is there some special meaning to v0.0.0? If so, should it be a constant defined with a meaningful name? If not, then what's the difference between reporting v0.0.0 and v10000000.v100000000000.v1000000000?

jdef added inline comments.Dec 7 2016, 9:13 PM
src/main/scala/mesosphere/mesos/LibMesos.scala
29

ugh. you get the point (ignoring the extra vs that made their way into my bogus example)

Its less than 1.1.0. 10000 > 1.1.0, so we would accept things.

src/main/scala/mesosphere/mesos/LibMesos.scala
29

Its less than 1.1.0. The bug here is that mesos has a bug where it feeds garbage 64bit ints and we get versions like -41012481231.1240141401.1241014810 and 1231232013181.1031241041.142014101

jenkins requested changes to this revision.Dec 7 2016, 9:53 PM
jenkins requested changes to this revision.Dec 7 2016, 10:18 PM
This revision was automatically updated to reflect the committed changes.