From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH] mem: fix possible memzone integer overflow
Date: Mon, 20 Jun 2016 10:57:59 +0200 [thread overview]
Message-ID: <1880209.krCoBmB9j2@xps13> (raw)
In-Reply-To: <1465927638-71892-1-git-send-email-sergio.gonzalez.monroy@intel.com>
2016-06-14 19:07, Sergio Gonzalez Monroy:
> It is possible to get an integer overflow if we try to reserve a memzone
> with len = 0 (meaning the maximum contiguous space available) and the
> maximum available elem size is less than (MALLOC_ELEM_OVERHEAD + align).
>
> Issue reported by Coverity:
>
> >>> 10. overflow: Subtract operation overflows on operands len and
> >>> 64UL.
> >>> CID 107111 (#1 of 1): Overflowed return value (INTEGER_OVERFLOW)
> >>> 11. overflow_sink: Overflowed or truncated value (or a value
> >>> computed from an overflowed or truncated value)
> >>> len - 64UL - align used as return value.
> 122 return len - MALLOC_ELEM_OVERHEAD - align;
>
> Fixes: fafcc11985a2 ("mem: rework memzone to be allocated by malloc")
>
> Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Applied, thanks
prev parent reply other threads:[~2016-06-20 8:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 18:07 [PATCH] mem: fix possible memzone integer overflow Sergio Gonzalez Monroy
2016-06-20 8:57 ` 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=1880209.krCoBmB9j2@xps13 \
--to=thomas.monjalon@6wind.com \
--cc=dev@dpdk.org \
--cc=sergio.gonzalez.monroy@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.