Re: [PATCH] Bluetooth: Remove VLA usage in aes_cmac

2018-03-20 Thread Gustavo A. R. Silva
Hi, I've just discovered an issue in this patch. Please, drop it. I'll send v2 shortly. Thanks -- Gustavo On 03/20/2018 06:34 PM, Gustavo A. R. Silva wrote: In preparation to enabling -Wvla, remove VLA and replace it with dynamic memory allocation instead. The use of stack Variable Length A

[PATCH] Bluetooth: Remove VLA usage in aes_cmac

2018-03-20 Thread Gustavo A. R. Silva
In preparation to enabling -Wvla, remove VLA and replace it with dynamic memory allocation instead. 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 or a security flaw. Also, in general, as code evolves it is