patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Maxime Coquelin <>
Cc:, Ilja Van Sprundel <>
Subject: Re: [dpdk-stable] [PATCH] vhost: catch overflow causing mmap of size 0
Date: Wed, 5 Feb 2020 10:49:10 +0100
Message-ID: <> (raw)
In-Reply-To: <>

On 1/16/20 11:44 AM, Maxime Coquelin wrote:
> This patch catches an overflow that could happen if an
> invalid region size or page alignement is provided by the
> guest via the VHOST_USER_SET_MEM_TABLE request.
> If the sum of the size to mmap and the alignment overflows
> uint64_t, then RTE_ALIGN_CEIL(mmap_size, alignment) macro
> will return 0. This value was passed as is as size argument
> to mmap().
> While kernel handling of mmap() syscall returns an error
> if size is 0, it is better to catch it earlier and provide
> a meaningful error log.
> Fixes: ec09c280b839 ("vhost: fix mmap not aligned with hugepage size")
> Cc:
> Reported-by: Ilja Van Sprundel <>
> Signed-off-by: Maxime Coquelin <>
> ---
>  lib/librte_vhost/vhost_user.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)

Applied to dpdk-next-virtio tree.


      parent reply	other threads:[~2020-02-05  9:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16 10:44 Maxime Coquelin
2020-01-17  7:51 ` Tiwei Bie
2020-02-05  9:49 ` Maxime Coquelin [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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ \
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone