Re: [PATCH] Use kzfree in mac80211 key handling to enforce data sanitization

From: Rik van Riel
Date: Sat May 30 2009 - 22:16:02 EST


Larry H. wrote:
[PATCH] Use kzfree in mac80211 key handling to enforce data sanitization

This patch replaces the kfree() calls within the mac80211 WEP RC4 key
handling and ieee80211 management APIs with kzfree(), to enforce
sanitization of the key buffer contents.

This prevents the keys from persisting on memory, potentially
leaking to other kernel users after re-allocation of the memory by
the LIFO allocators, or in coldboot attack scenarios. Information can be
leaked as well due to use of uninitialized variables, or other bugs.

This patch doesn't affect fastpaths.

This seems to be essentially what Ingo proposed.

Clearing out a buffer that held a wifi key on free
makes sense, even for systems that are not in
paranoid mode.

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

Acked-by: Rik van Riiel <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 http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/