[PATCH] app/graph: fix destination buffer too small

Stephen Hemminger stephen at networkplumber.org
Sun Jun 23 22:26:07 CEST 2024


On Mon, 24 Jun 2024 00:09:21 +0400
Mahmoud Maatuq <mahmoudmatook.mm at gmail.com> wrote:

> as sizeof(config.rx.mempool_name) is < sizeof(res->mempool), it's safer
> to copy min size of them to avoide out of bound memory write.
> 
> Coverity issue: 415430
> Fixes: 3850cb06ab9c ("app/graph: add ethdev commands")
> Cc: skori at marvell.com
> 
> Signed-off-by: Mahmoud Maatuq <mahmoudmatook.mm at gmail.com>

NAK, this could create an invalid not null terminated string.

Since mempool name is a null terminated string this should have always
used strlcpy instead of memcpy.


More information about the dev mailing list