Page MenuHome GnuPG

Missing bounds check in libgcrypt's Dilithium context handling
Closed, ResolvedPublic

Description

The low-level Dilithium code as used by Libgcrypt uses a static array PRE but fills it from the CTX arg w/o a check. This bug needs to be fixed but real-world severity is low because the context is a protocol or implementation defined constant and thus not derived from attacker controlled data..

Reported-by: Calif.io in collaboration with Claude and Anthropic Research.

Related Objects

Event Timeline

werner created this task.
werner created this object with edit policy "Contributor (Project)".
gniibe added a subscriber: gniibe.

Minimum fix is:

The minimum fix avoids changes needed, thus, a bit confusing as a whole.
Here are better changes:


gniibe mentioned this in Unknown Object (Maniphest Task).Mon, Apr 13, 6:35 AM
gniibe changed the task status from Open to Testing.Wed, Apr 15, 7:32 AM
gniibe mentioned this in Unknown Object (Maniphest Task).Mon, Apr 20, 9:40 AM

FWIW: There is actually a problem in the reference code: Having a
fixed size buffer inside a function and allowing the caller to provide
content at arbitrary length is bad coding style because the caller
needs to know internals of the called function (in a different source
file).

This should be reported to the reference code maintainers.