diff options
author | jsing <> | 2020-05-11 18:08:11 +0000 |
---|---|---|
committer | jsing <> | 2020-05-11 18:08:11 +0000 |
commit | b533040a570f1fe902202c032531870f58ad4453 (patch) | |
tree | dbb27561139b82aa9e5d608eacbc8c9224b46124 /src/lib/libssl/tls13_record.c | |
parent | 825d508a4b688821e99561b72a842c81c93b84a5 (diff) | |
download | openbsd-b533040a570f1fe902202c032531870f58ad4453.tar.gz openbsd-b533040a570f1fe902202c032531870f58ad4453.tar.bz2 openbsd-b533040a570f1fe902202c032531870f58ad4453.zip |
Propagate record overflows to the record layer and alert.
ok beck@ tb@
Diffstat (limited to 'src/lib/libssl/tls13_record.c')
-rw-r--r-- | src/lib/libssl/tls13_record.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libssl/tls13_record.c b/src/lib/libssl/tls13_record.c index ca61a94ff1..c856932b40 100644 --- a/src/lib/libssl/tls13_record.c +++ b/src/lib/libssl/tls13_record.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls13_record.c,v 1.5 2020/05/11 18:03:51 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_record.c,v 1.6 2020/05/11 18:08:11 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -145,11 +145,10 @@ tls13_record_recv(struct tls13_record *rec, tls13_read_cb wire_read, | |||
145 | if (!CBS_get_u16(&cbs, &rec_len)) | 145 | if (!CBS_get_u16(&cbs, &rec_len)) |
146 | return TLS13_IO_FAILURE; | 146 | return TLS13_IO_FAILURE; |
147 | 147 | ||
148 | /* XXX - record overflow alert. */ | ||
149 | if ((rec_version >> 8) != SSL3_VERSION_MAJOR) | 148 | if ((rec_version >> 8) != SSL3_VERSION_MAJOR) |
150 | return TLS13_IO_RECORD_VERSION; | 149 | return TLS13_IO_RECORD_VERSION; |
151 | if (rec_len > TLS13_RECORD_MAX_CIPHERTEXT_LEN) | 150 | if (rec_len > TLS13_RECORD_MAX_CIPHERTEXT_LEN) |
152 | return TLS13_IO_FAILURE; | 151 | return TLS13_IO_RECORD_OVERFLOW; |
153 | 152 | ||
154 | rec->content_type = content_type; | 153 | rec->content_type = content_type; |
155 | rec->version = rec_version; | 154 | rec->version = rec_version; |