[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150818.190840.1520518833381816197.davem@davemloft.net>
Date: Tue, 18 Aug 2015 19:08:40 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: sven@...fation.org
Cc: netdev@...r.kernel.org, b.a.t.m.a.n@...ts.open-mesh.org,
antonio@...hcoding.com, mareklindner@...mailbox.ch
Subject: Re: [PATCH net] batman-adv: Fix memory leak on tt add with invalid
vlan
From: Sven Eckelmann <sven@...fation.org>
Date: Tue, 18 Aug 2015 13:37:01 +0200
> The object tt_local is allocated with kmalloc and not initialized when the
> function batadv_tt_local_add checks for the vlan. But this function can
> only cleanup the object when the (not yet initialized) reference counter of
> the object is 1. This is unlikely and thus the object would leak when the
> vlan could not be found.
>
> Instead the uninitialized object tt_local has to be freed manually and the
> pointer has to set to NULL to avoid calling the function which would try to
> decrement the reference counter of the not existing object.
>
> CID: 1316518
> Fixes: 354136bcc3c4 ("batman-adv: fix kernel crash due to missing NULL checks")
> Signed-off-by: Sven Eckelmann <sven@...fation.org>
Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists