Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 May 2002 17:35:34 -0700 (PDT)
From:      Kelly Yancey <kbyanc@posi.net>
To:        freebsd-stable@freebsd.org
Cc:        freebsd-tokenring@freebsd.org, <freebsd-net@freebsd.org>
Subject:   Call for testers
Message-ID:  <20020507171815.H28397-200000@gateway.posi.net>

next in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-1423277081-1020818134=:28397
Content-Type: TEXT/PLAIN; charset=US-ASCII


  I am looking for testers for the attached patch in hopes of MFC'ing this
bug-fix from -current to -stable in time for 4.6-RELEASE.  The bug being
addressed is that interface's with names longer than 6 characters often
overflow the sockaddr_dl data structure's buffer for holding them
(specifically, 7 or more characters for the interface name plus the 6 bytes
for ethernet or token ring hardware addresses exceeds the 12 byte sdl_data
field that is to hold them).  The manifestation of this bug is that the iso
802.5 source routing control field is overwritten with part of the interface's
hardware address (and vice-a-versa).
  The fix committed to -current is the same as that in the attached patch.
Both give the storage previously reserved for 802.5 source routing information
to the sdl_data field so it may be used to hold longer interface names or
hardware addresses.  In the case of token-ring, source routing information is
stored in the sdl_data field now, but at the same offset as it used to be in
the structure, so there is effectively no change.

  So the overall effect is that token-ring interface names still may not
exceed 6 characters in length.  However, for all other interfaces, there is
plenty of room allotted for the interface name and hardware address (46 bytes
now as compared to 12) thereby averting the overflow.  In addition, since the
structure offsets did not change nor did the size of the sockaddr_dl structure
itself, I believe there should be no imcompatibility with binary-only network
drivers.

  However, I do not have access to any token-ring hardware so I cannot be 100%
sure that I didn't break 802.5 source routing on such devices.  Therefor, I
would be most grateful if anyone with token ring hardware could please apply
the attached patches and report any successes for failures.  Thanks,

  Kelly

--0-1423277081-1020818134=:28397
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="sdl_data-overflow4.diff"
Content-Transfer-Encoding: BASE64
Content-ID: <20020507173534.P28397@gateway.posi.net>
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oLT5yZCwgcmlmX2xlbiAtIDIpOw0K
LQkJCQlzZGwtPnNkbF9yY2YgJj0gfmh0b25zKFRSX1JDRl9CQ1NUX01BU0sp
Ow0KKwkJCQl0cmxkLT50cmxkX3JjZiA9IHRoLT5yY2Y7DQorCQkJCXRybGQt
PnRybGRfcmNmIF49IGh0b25zKFRSX1JDRl9ESVIpOw0KKwkJCQltZW1jcHko
dHJsZC0+dHJsZF9yb3V0ZSwgdGgtPnJkLCByaWZfbGVuIC0gMik7DQorCQkJ
CXRybGQtPnRybGRfcmNmICY9IH5odG9ucyhUUl9SQ0ZfQkNTVF9NQVNLKTsN
CiAJCQkJLyoNCiAJCQkJICogU2V0IHVwIHNvdXJjZSByb3V0aW5nIGluZm9y
bWF0aW9uIGZvcg0KIAkJCQkgKiByZXBseSBwYWNrZXQgKFhYWCkNCkBAIC02
NzUsOSArNjc2LDcgQEANCiAJCQltLT5tX2RhdGEgLT0gODsNCiAJCQltLT5t
X2xlbiAgKz0gODsNCiAJCQltLT5tX3BrdGhkci5sZW4gKz0gODsNCi0JCQl0
aC0+cmNmID0gc2RsLT5zZGxfcmNmOw0KLQkJfSBlbHNlIHsNCi0JCQlzZGwt
PnNkbF9yY2YgPSAodV9zaG9ydCkwOw0KKwkJCXRoLT5yY2YgPSB0cmxkLT50
cmxkX3JjZjsNCiAJCX0NCiAJCWlmIChydC0+cnRfZXhwaXJlKQ0KIAkJCXJ0
LT5ydF9leHBpcmUgPSB0aW1lX3NlY29uZCArIGFycHRfa2VlcDsNCg==
--0-1423277081-1020818134=:28397--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-tokenring" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020507171815.H28397-200000>