[SSSD] [PATCH] Out-of-bounds read fix in hmac-sha-1

Simo Sorce simo at redhat.com
Fri Sep 7 12:20:29 UTC 2012


On Fri, 2012-09-07 at 10:56 +0200, Ondrej Kos wrote:
> fixes https://fedorahosted.org/sssd/ticket/1331
> 
> Although the given memset wasn't doing anything when *key_len == 
> HMAC_SHA1_BLOCKSIZE* (length of bytes to set was 0), the first argument 
> to memset was an address starting right after the key itself - 
> out-of-bounds.

I haven't looked at the rest of the code, but a more defensive way of
doing the test is checking key_len < HMAC_SHA1_BLOCKSIZE, and not just
checking it is different.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York




More information about the sssd-devel mailing list