Re: [PATCH] mmc: pwrseq: Use kmalloc_array instead of stack VLA

2018-04-04 Thread Kees Cook
On Wed, Apr 4, 2018 at 5:45 AM, Ulf Hansson wrote: > On 26 March 2018 at 08:33, Tobin C. Harding wrote: >> The use of stack Variable Length Arrays needs to be avoided, as they >> can be a vector for stack exhaustion, which can be both a runtime bug >> (kernel Oops) or a security flaw (overwriting

Re: [PATCH] mmc: pwrseq: Use kmalloc_array instead of stack VLA

2018-04-04 Thread Ulf Hansson
On 26 March 2018 at 08:33, Tobin C. Harding wrote: > The use of stack Variable Length Arrays needs to be avoided, as they > can be a vector for stack exhaustion, which can be both a runtime bug > (kernel Oops) or a security flaw (overwriting memory beyond the > stack). Also, in general, as code ev

[PATCH] mmc: pwrseq: Use kmalloc_array instead of stack VLA

2018-03-25 Thread Tobin C. Harding
The use of stack Variable Length Arrays needs to be avoided, as they can be a vector for stack exhaustion, which can be both a runtime bug (kernel Oops) or a security flaw (overwriting memory beyond the stack). Also, in general, as code evolves it is easy to lose track of how big a VLA can get. Thu