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)
Tue, Apr 16, 2:55 PM
Unknown Object (File)
Feb 8 2024, 5:31 AM
Unknown Object (File)
Dec 20 2023, 2:58 AM
Unknown Object (File)
Dec 16 2023, 2:49 PM
Unknown Object (File)
Dec 12 2023, 8:37 AM
Unknown Object (File)
Oct 14 2023, 2:30 AM
Unknown Object (File)
Sep 21 2023, 9:51 PM
Unknown Object (File)
Sep 2 2023, 9:33 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.