From: Marek Lindner <mareklindner@neomailbox.ch>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Fix unexpected free of bcast_own on add_if error
Date: Sun, 28 Feb 2016 07:33:01 +0800 [thread overview]
Message-ID: <1694936.QPXWkBB6xO@voltaire> (raw)
In-Reply-To: <1456178194-29307-1-git-send-email-sven@narfation.org>
[-- Attachment #1: Type: text/plain, Size: 1017 bytes --]
On Monday, February 22, 2016 22:56:33 Sven Eckelmann wrote:
> The function batadv_iv_ogm_orig_add_if allocates new buffers for bcast_own
> and bcast_own_sum. It is expected that these buffers are unchanged in case
> either bcast_own or bcast_own_sum couldn't be resized.
>
> But the error handling of this function frees the already resized buffer
> for bcast_own when the allocation of the new bcast_own_sum buffer failed.
> This will lead to an invalid memory access when some code will try to
> access bcast_own.
>
> Instead the resized new bcast_own buffer has to be kept. This will not lead
> to problems because the size of the buffer was only increased and therefore
> no user of the buffer will try to access bytes outside of the new buffer.
>
> Fixes: fdafa7d29ace ("batman-adv: provide orig_node routing API")
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> ---
> net/batman-adv/bat_iv_ogm.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Applied in revision 32bcb3f.
Thanks,
Marek
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2016-02-27 23:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-22 21:56 [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Fix unexpected free of bcast_own on add_if error Sven Eckelmann
2016-02-22 21:56 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Split batadv_iv_ogm_orig_del_if function Sven Eckelmann
2016-02-27 23:41 ` Marek Lindner
2016-02-27 23:33 ` Marek Lindner [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=1694936.QPXWkBB6xO@voltaire \
--to=mareklindner@neomailbox.ch \
--cc=b.a.t.m.a.n@lists.open-mesh.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