FreeBSD Bugzilla – Attachment 223952 Details for
Bug 254924
stp does not validate timer values in config BPDU
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
stp.diff (text/plain), 657 bytes, created by
jcaplan
on 2021-04-09 17:24:03 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
jcaplan
Created:
2021-04-09 17:24:03 UTC
Size:
657 bytes
patch
obsolete
>diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c >index 9e3a3e14ecda..d7ef0edbd42e 100644 >--- a/sys/net/bridgestp.c >+++ b/sys/net/bridgestp.c >@@ -597,6 +597,20 @@ bstp_received_bpdu(struct bstp_state *bs, struct bstp_port *bp, > return; > } > >+ /* range checks */ >+ if (cu->cu_message_age >= cu->cu_max_age) { >+ return; >+ } >+ if ((cu->cu_max_age < (6 * 256)) || (cu->cu_max_age > (40 * 256))) { >+ return; >+ } >+ if ((cu->cu_forward_delay < (4 * 256)) || (cu->cu_forward_delay > (30 * 256))) { >+ return; >+ } >+ if ((cu->cu_hello_time < 256) || (cu->cu_hello_time> (2 * 256))) { >+ return; >+ } >+ > type = bstp_pdu_rcvtype(bp, cu); > > switch (type) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 254924
: 223952