Re: [dpdk-dev] [PATCH v2] mbuf: fix out-of-bounds access

2020-06-11 Thread Olivier Matz
On Thu, Jun 11, 2020 at 08:48:01AM +0800, Xiaolong Ye wrote: > We should make sure off + size < sizeof(struct rte_mbuf) to avoid > possible out-of-bounds access of free_space array, there is no issue > currently due to the low bits of free_flags (which is adjacent to > free_space) are always set to

[dpdk-dev] [PATCH v2] mbuf: fix out-of-bounds access

2020-06-10 Thread Xiaolong Ye
We should make sure off + size < sizeof(struct rte_mbuf) to avoid possible out-of-bounds access of free_space array, there is no issue currently due to the low bits of free_flags (which is adjacent to free_space) are always set to 0. But we shouldn't rely on it since it's fragile and layout of stru