Re: [PATCH 4/4] net/tap: Avoid variable-length array

2023-08-25 Thread Francisco Iglesias
On [2023 Aug 24] Thu 16:32:24, Peter Maydell wrote: > Use a heap allocation instead of a variable length array in > tap_receive_iov(). > > The codebase has very few VLAs, and if we can get rid of them all we > can make the compiler error on new additions. This is a defensive > measure against

[PATCH 4/4] net/tap: Avoid variable-length array

2023-08-24 Thread Peter Maydell
Use a heap allocation instead of a variable length array in tap_receive_iov(). The codebase has very few VLAs, and if we can get rid of them all we can make the compiler error on new additions. This is a defensive measure against security bugs where an on-stack dynamic allocation isn't correctly