[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140529043106.320390607@linuxfoundation.org>
Date: Wed, 28 May 2014 21:34:31 -0700
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Sven Eckelmann <sven@...fation.org>,
Marek Lindner <mareklindner@...mailbox.ch>,
Antonio Quartulli <antonio@...hcoding.com>
Subject: [PATCH 3.14 132/140] batman-adv: fix indirect hard_iface NULL dereference
3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Lindner <mareklindner@...mailbox.ch>
[ Upstream commit 16a4142363b11952d3aa76ac78004502c0c2fe6e ]
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.
Introduced in cb1c92ec37fb70543d133a1fa7d9b54d6f8a1ecd
("batman-adv: add debugfs support to view multiif tables").
Reported-by: Sven Eckelmann <sven@...fation.org>
Signed-off-by: Marek Lindner <mareklindner@...mailbox.ch>
Acked-by: Antonio Quartulli <antonio@...hcoding.com>
Signed-off-by: Antonio Quartulli <antonio@...hcoding.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
net/batman-adv/originator.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -1074,7 +1074,8 @@ int batadv_orig_hardif_seq_print_text(st
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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists