Re: [PATCH] Use kzfree in crypto API context initialization and key/ivhandling

From: Rik van Riel
Date: Sun May 31 2009 - 10:38:58 EST

Larry H. wrote:
[PATCH] Use kzfree in crypto API context initialization and key/iv handling

This patch replaces the kfree() calls within the crypto API (algorithms,
key setup and handling, etc) with kzfree(), to enforce sanitization of
the allocated memory.

This prevents such information from persisting on memory and eventually
leak to other kernel users or during coldboot attacks.

This patch replaces kfree() for context (algorithm meta-data) structures
too. Those are initialized or released once, and remain in use during the
lifetime of the cipher/algorithm instance, therefore no performance impact
exists for those specific changes.

This patch doesn't affect fastpaths.

Signed-off-by: Larry Highsmith <research@xxxxxxxxxxxxxx>

Acked-by: Rik van Riel <riel@xxxxxxxxxx>

All rights reversed.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at