From: Greg KH <gregkh@linuxfoundation.org>
To: Sven Eckelmann <sven@narfation.org>
Cc: stable@vger.kernel.org, Simon Wunderlich <sw@simonwunderlich.de>
Subject: Re: [PATCH 4.19 1/1] batman-adv: Avoid free/alloc race when handling OGM2 buffer
Date: Tue, 17 Mar 2020 10:55:44 +0100 [thread overview]
Message-ID: <20200317095544.GA1068955@kroah.com> (raw)
In-Reply-To: <20200316225115.32530-1-sven@narfation.org>
On Mon, Mar 16, 2020 at 11:51:15PM +0100, Sven Eckelmann wrote:
> commit a8d23cbbf6c9f515ed678204ad2962be7c336344 upstream.
>
> A B.A.T.M.A.N. V virtual interface has an OGM2 packet buffer which is
> initialized using data from the netdevice notifier and other rtnetlink
> related hooks. It is sent regularly via various slave interfaces of the
> batadv virtual interface and in this process also modified (realloced) to
> integrate additional state information via TVLV containers.
>
> It must be avoided that the worker item is executed without a common lock
> with the netdevice notifier/rtnetlink helpers. Otherwise it can either
> happen that half modified data is sent out or the functions modifying the
> OGM2 buffer try to access already freed memory regions.
>
> Fixes: 0da0035942d4 ("batman-adv: OGMv2 - add basic infrastructure")
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
> ---
> net/batman-adv/bat_v_ogm.c | 42 ++++++++++++++++++++++++++++++--------
> net/batman-adv/types.h | 4 ++++
> 2 files changed, 38 insertions(+), 8 deletions(-)
Now applied, thanks!
greg k-h
prev parent reply other threads:[~2020-03-17 9:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-16 22:51 [PATCH 4.19 1/1] batman-adv: Avoid free/alloc race when handling OGM2 buffer Sven Eckelmann
2020-03-17 9:55 ` Greg KH [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=20200317095544.GA1068955@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=stable@vger.kernel.org \
--cc=sven@narfation.org \
--cc=sw@simonwunderlich.de \
/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.