Page MenuHomeFreeBSD

bridgestp: validate timer values in config BPDU
ClosedPublic

Authored by kp on Apr 15 2021, 5:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 16, 9:27 AM
Unknown Object (File)
Oct 6 2024, 10:23 AM
Unknown Object (File)
Oct 6 2024, 12:49 AM
Unknown Object (File)
Oct 3 2024, 4:20 AM
Unknown Object (File)
Oct 3 2024, 1:09 AM
Unknown Object (File)
Oct 1 2024, 9:19 AM
Unknown Object (File)
Sep 29 2024, 4:40 PM
Unknown Object (File)
Sep 27 2024, 1:48 PM

Details

Summary

IEEE Std 802.1D-2004 Section 17.14 defines permitted ranges for timers.
Incoming BPDU messages should be checked against the permitted ranges.
The rest of 17.14 appears to be enforced already.

PR: 254924

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kp requested review of this revision.Apr 15 2021, 5:35 PM
donner added a subscriber: donner.
donner added inline comments.
sys/net/bridgestp.c
604–605

Should this be "<=" and ">="?

608–609

Dito

613

Dito and may you have a space left?

This revision is now accepted and ready to land.Apr 15 2021, 8:08 PM
kp marked 2 inline comments as done.Apr 15 2021, 9:00 PM
kp added inline comments.
sys/net/bridgestp.c
604–605

No, BSTP_MIN_MAX_AGE is still acceptable. The cu_max_age value should only be rejected if it's strictly less than that value. (Or more than the maximum value).

See also bstp_set_maxage() for example.

613

Yes. I checked the couch and found a loose space, so I don't have to run to the store to buy more.

sys/net/bridgestp.c
613

May you insert the space into the code like this?

cu->cu_hello_time > BSTP_MAX_HELLO_TIME
kp marked an inline comment as done.Apr 16 2021, 8:28 AM
kp added inline comments.
sys/net/bridgestp.c
613

Yes, I've applied that change in my local version of this commit and it'll be included when I push this later today.

This revision now requires review to proceed.Apr 16 2021, 8:29 AM
This revision was not accepted when it landed; it landed in state Needs Review.Apr 19 2021, 12:11 PM
This revision was automatically updated to reflect the committed changes.