* [B.A.T.M.A.N.] [PATCH maint] batman-adv: fix indirect hard_iface NULL dereference
@ 2014-04-23 19:46 Marek Lindner
2014-04-24 12:03 ` Antonio Quartulli
0 siblings, 1 reply; 3+ messages in thread
From: Marek Lindner @ 2014-04-23 19:46 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Marek Lindner
If hard_iface is NULL and goto out is made batadv_hardif_free_ref()
doesn't check for NULL before dereferencing it to get to refcount.
Reported-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
---
originator.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/originator.c b/originator.c
index aa2468b..35b42f8 100644
--- a/originator.c
+++ b/originator.c
@@ -1074,7 +1074,8 @@ int batadv_orig_hardif_seq_print_text(struct seq_file *seq, void *offset)
bat_priv->bat_algo_ops->bat_orig_print(bat_priv, seq, hard_iface);
out:
- batadv_hardif_free_ref(hard_iface);
+ if (hard_iface)
+ batadv_hardif_free_ref(hard_iface);
return 0;
}
--
2.0.0.rc0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH maint] batman-adv: fix indirect hard_iface NULL dereference
2014-04-23 19:46 [B.A.T.M.A.N.] [PATCH maint] batman-adv: fix indirect hard_iface NULL dereference Marek Lindner
@ 2014-04-24 12:03 ` Antonio Quartulli
2014-05-02 5:06 ` Marek Lindner
0 siblings, 1 reply; 3+ messages in thread
From: Antonio Quartulli @ 2014-04-24 12:03 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking; +Cc: Marek Lindner
[-- Attachment #1: Type: text/plain, Size: 518 bytes --]
On 23/04/14 21:46, Marek Lindner wrote:
> If hard_iface is NULL and goto out is made batadv_hardif_free_ref()
> doesn't check for NULL before dereferencing it to get to refcount.
>
> Reported-by: Sven Eckelmann <sven@narfation.org>
> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
ACK for the change, but shouldn't we have an Introduced-by in each
patch? Later I will change it to point to the "proper" patch before
sending these changes to David.
Cheers,
--
Antonio Quartulli
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH maint] batman-adv: fix indirect hard_iface NULL dereference
2014-04-24 12:03 ` Antonio Quartulli
@ 2014-05-02 5:06 ` Marek Lindner
0 siblings, 0 replies; 3+ messages in thread
From: Marek Lindner @ 2014-05-02 5:06 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Sven Eckelmann, Antonio Quartulli
[-- Attachment #1: Type: text/plain, Size: 608 bytes --]
On Thursday 24 April 2014 14:03:29 Antonio Quartulli wrote:
> On 23/04/14 21:46, Marek Lindner wrote:
> > If hard_iface is NULL and goto out is made batadv_hardif_free_ref()
> > doesn't check for NULL before dereferencing it to get to refcount.
> >
> > Reported-by: Sven Eckelmann <sven@narfation.org>
> > Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
>
> ACK for the change, but shouldn't we have an Introduced-by in each
> patch? Later I will change it to point to the "proper" patch before
> sending these changes to David.
Applied in revision 2ac2c94 (with Introduced-by).
Regards,
Marek
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-02 5:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-23 19:46 [B.A.T.M.A.N.] [PATCH maint] batman-adv: fix indirect hard_iface NULL dereference Marek Lindner
2014-04-24 12:03 ` Antonio Quartulli
2014-05-02 5:06 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox