]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: jwe: fix theoretical overflow in AAD length calculation
authorWilly Tarreau <w@1wt.eu>
Wed, 29 Apr 2026 08:02:11 +0000 (10:02 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 18 May 2026 16:52:28 +0000 (18:52 +0200)
commit29b9da7821a13089ea3b8eed4a40beb9dd5ef0ee
tree12da6fe05fc79ed14bc848c2bbb0d6b2824b8c9d
parentd4a4be6c34a8b13f564f99a0aad8d4ef2cb6b055
CLEANUP: jwe: fix theoretical overflow in AAD length calculation

The expression items[JWE_ELT_JOSE].length << 3 performs the shift on an
unsigned int (32-bit) before being cast to uint64_t instead of after.
This means that we don't cover for a possible overflow (which would
never happen as it would need a header length beyond 512MB). At least
fixing it will avoid code check reports.
src/jwe.c