]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: jwe: Buffer overflow when filling fake cek in case of RSA1.5
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Wed, 30 Sep 2026 08:27:12 +0000 (10:27 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 14:11:24 +0000 (16:11 +0200)
commit623789ef276986795f1fdfb2b8e523a349a3acb7
tree30279d622185780d55fb6b37d282c9afdbbee84f
parent4e151a25b65bbbc83f10a320eddf71dc8076970c
BUG/MINOR: jwe: Buffer overflow when filling fake cek in case of RSA1.5

In commit 1a5a333 "BUG/MEDIUM: jwe: substitute random CEK on RSA1_5
decryption failure per RFC 7516 #11.5" we fill a fake CEK with random
data to avoid timing attacks. But the loop that fills the buffer does is
8 bytes at a time but the index was not properly incremented which could
result in a buffer overflow if the "struct buffer" size was too short.

This issue was found by Dmitri Kaslov.

This patch should be backported to 3.4.
src/jwe.c