From: Thomas Monjalon <thomas@monjalon.net>
To: Daniil Iskhakov <dish@amicon.ru>
Cc: stable@dpdk.org, dev@dpdk.org, rrv@amicon.ru, sdl.dpdk@linuxtesting.org
Subject: Re: [PATCH v3] cmdline: prevent out-of-bounds read in completion buffer
Date: Wed, 10 Jun 2026 14:28:14 +0200 [thread overview]
Message-ID: <L9FKH0WQStK2yvI_geheig@monjalon.net> (raw)
In-Reply-To: <20260430170111.1557768-1-dish@amicon.ru>
30/04/2026 19:01, Daniil Iskhakov:
> tmp_buf is populated by the completion callback and is not guaranteed
> to be NUL-terminated.
>
> The code already accounts for this when computing tmp_size with
> strnlen(tmp_buf, sizeof(tmp_buf)). However, another loop in the same
> path still walks tmp_buf until a NUL byte is found, without checking
> the buffer limit.
>
> If the callback writes a full-sized non-NUL-terminated string, the loop
> may read past the end of tmp_buf.
>
> Fix this by computing a bounded length for each completion choice before
> printing it.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: af75078fece3 ("first public release")
> Cc: stable@dpdk.org
>
> Signed-off-by: Daniil Iskhakov <dish@amicon.ru>
Applied, thanks.
prev parent reply other threads:[~2026-06-10 12:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 15:34 [PATCH v2] cmdline: prevent out-of-bounds read in completion buffer Daniil Iskhakov
2026-04-30 11:55 ` Konstantin Ananyev
2026-04-30 17:01 ` [PATCH v3] " Daniil Iskhakov
2026-06-10 12:28 ` Thomas Monjalon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=L9FKH0WQStK2yvI_geheig@monjalon.net \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=dish@amicon.ru \
--cc=rrv@amicon.ru \
--cc=sdl.dpdk@linuxtesting.org \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox