crypto/tls: disallow handshake messages fragmented across CCS
BoGo: FragmentAcrossChangeCipherSpec-Server-Packed
This commit is contained in:
parent
4191962f25
commit
de613b152d
5
conn.go
5
conn.go
@ -776,6 +776,11 @@ func (c *Conn) readRecord(want recordType) error {
|
||||
c.in.setErrorLocked(c.sendAlert(alertUnexpectedMessage))
|
||||
break
|
||||
}
|
||||
// Handshake messages are not allowed to fragment across the CCS
|
||||
if c.hand.Len() > 0 {
|
||||
c.in.setErrorLocked(c.sendAlert(alertUnexpectedMessage))
|
||||
break
|
||||
}
|
||||
err := c.in.changeCipherSpec()
|
||||
if err != nil {
|
||||
c.in.setErrorLocked(c.sendAlert(err.(alert)))
|
||||
|
Loading…
Reference in New Issue
Block a user