projects
/
BearSSL
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f795e5
)
Fixed bug in handling incoming records with invalid length (impacted CBC encryption...
master
author
Thomas Pornin
<thomas.pornin@nccgroup.com>
Mon, 6 Apr 2026 13:40:05 +0000
(09:40 -0400)
committer
Thomas Pornin
<thomas.pornin@nccgroup.com>
Mon, 6 Apr 2026 13:40:05 +0000
(09:40 -0400)
Bug was reported by Thai Duong at Calif.io (with some AI stuff from Anthropic Research).
src/ssl/ssl_rec_cbc.c
patch
|
blob
|
history
diff --git
a/src/ssl/ssl_rec_cbc.c
b/src/ssl/ssl_rec_cbc.c
index
c38cbfd
..
9e89bb6
100644
(file)
--- a/
src/ssl/ssl_rec_cbc.c
+++ b/
src/ssl/ssl_rec_cbc.c
@@
-70,7
+70,7
@@
cbc_check_length(const br_sslrec_in_cbc_context *cc, size_t rlen)
min_len += blen;
max_len += blen;
}
- return min_len <= rlen && rlen <= max_len;
+ return min_len <= rlen && rlen <= max_len
&& (rlen & (blen - 1)) == 0
;
}
/*