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)
Mon, Sep 9, 8:44 PM
Unknown Object (File)
Wed, Sep 4, 12:48 PM
Unknown Object (File)
Aug 17 2024, 8:47 PM
Unknown Object (File)
Aug 14 2024, 9:48 AM
Unknown Object (File)
Aug 13 2024, 4:19 AM
Unknown Object (File)
Aug 11 2024, 8:44 PM
Unknown Object (File)
Aug 10 2024, 6:41 AM
Unknown Object (File)
Jul 28 2024, 9:23 AM

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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 38601
Build 35490: arc lint + arc unit

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.