mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Fix a bug that WILL cause a panic. Basically
a read-lock is being called to check the vtag-timewait cache. Then in two cases (where a vtag is bad i.e. in the time-wait state) the write-unlock is called NOT the read-unlock. Under conditions where lots of associations are coming and going this will cause the system to panic at some point. MFC after: 3 days
This commit is contained in:
parent
8d7c49114c
commit
606c58db25
1 changed files with 2 additions and 2 deletions
|
|
@ -6499,7 +6499,7 @@ sctp_is_vtag_good(struct sctp_inpcb *inp, uint32_t tag, uint16_t lport, uint16_t
|
|||
continue;
|
||||
}
|
||||
/* Its a used tag set */
|
||||
SCTP_INP_INFO_WUNLOCK();
|
||||
SCTP_INP_INFO_RUNLOCK();
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
|
@ -6528,7 +6528,7 @@ skip_vtag_check:
|
|||
(twait_block->vtag_block[i].lport == lport) &&
|
||||
(twait_block->vtag_block[i].rport == rport)) {
|
||||
/* Bad tag, sorry :< */
|
||||
SCTP_INP_INFO_WUNLOCK();
|
||||
SCTP_INP_INFO_RUNLOCK();
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue