[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <23121.1351645166@warthog.procyon.org.uk>
Date: Wed, 31 Oct 2012 00:59:26 +0000
From: David Howells <dhowells@...hat.com>
To: Kees Cook <keescook@...omium.org>
Cc: dhowells@...hat.com, rusty@...tcorp.com.au, pjones@...hat.com,
jwboyer@...hat.com, mjg@...hat.com, dmitry.kasatkin@...el.com,
zohar@...ux.vnet.ibm.com, keyrings@...ux-nfs.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 16/23] pefile: Parse a PE binary to find a key and a signature contained therein
Kees Cook <keescook@...omium.org> wrote:
> This multiplication can push the cursor out of bounds. (n_data_dirents
> is unverified).
> ...
> Both of these cases of n_sections multiplications can wrap.
> Ultimately, you can end up with cursor close to zero, but n_sections
> being giant.
Good points. I wonder if I should limit these to some low number, or just
check that they don't exceed header_size, which also needs checking as you
said.
> ... (Also, do you want a "break" in there after the first .keylist is found,
> or is this intentionally "use last key list"?)
I hadn't considered that. Inserting a break is probably best, if only to
curtail the processing time slightly.
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists