Files
wolfssl/tests/api
Tobias Frauenschläger d4755b4b62 Fix EVP_DecodeUpdate overflow on NUL byte in base64 input
The quad decoding loop broke out on a NUL byte without clearing the
remaining input length, unlike the equivalent loops in Base64_Decode and
Base64_Decode_nonCT. Control then fell into the block that buffers the
leftover input in the context, which copied the full remaining byte count
into the 48 byte ctx->data with an unbounded index, and read one byte past
the end of the caller's buffer. An application decoding attacker supplied
base64 with an explicit, binary safe length could write attacker
controlled data past the end of a heap allocated encode context.

Clear the length before breaking, and bound the leftover copy loop at one
decode block, which is the most that loop can legitimately buffer. That
also keeps ctx->remaining below the block size, so a reused context cannot
underflow the copy size in the next update call or over-read ctx->data in
EVP_DecodeFinal.

Add a negative test feeding a NUL byte followed by more non-whitespace
data than the context buffer can hold.

Fixes F-7445.
2026-08-07 08:11:23 +02:00
..
2026-02-18 09:52:21 -07:00
2026-08-07 09:30:56 +10:00
2026-02-18 09:52:21 -07:00
2026-07-24 14:34:17 -04:00
2026-07-24 14:34:17 -04:00
2026-08-03 16:30:31 -07:00
2026-08-03 16:30:31 -07:00
2026-02-18 09:52:21 -07:00
2026-03-05 08:51:52 -06:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-05-13 11:36:36 -06:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-06-04 18:29:24 +10:00
2026-07-29 14:59:47 +10:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-05-07 02:33:58 +00:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-07-08 09:33:47 +10:00
2026-07-08 09:33:47 +10:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-07-24 16:39:54 -05:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-08-07 09:30:56 +10:00
2026-08-07 09:30:56 +10:00
2026-08-07 09:30:56 +10:00
2026-08-07 09:30:56 +10:00
2026-08-07 09:30:56 +10:00
2026-08-07 09:30:56 +10:00
2026-08-07 09:30:56 +10:00
2026-08-07 09:30:56 +10:00
2026-08-07 09:30:56 +10:00
2026-08-07 09:30:56 +10:00
2026-07-08 09:33:47 +10:00
2026-07-08 09:33:47 +10:00