summaryrefslogtreecommitdiff
path: root/net/netfilter/xt_IDLETIMER.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-09-04 16:01:57 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-09-17 16:11:12 +0200
commit70c0eb1ca016f7b6be6cd2a47efc4c701ce4488f (patch)
treebd63a56577665026aa8f24458f734dcced723ace /net/netfilter/xt_IDLETIMER.c
parentfa5950e498e7face21a1761f327e6c1152f778c3 (diff)
netfilter: xtables: avoid BUG_ON
I see no reason for them, label or timer cannot be NULL, and if they were, we'll crash with null deref anyway. For skb_header_pointer failure, just set hotdrop to true and toss such packet. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/xt_IDLETIMER.c')
-rw-r--r--net/netfilter/xt_IDLETIMER.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/net/netfilter/xt_IDLETIMER.c b/net/netfilter/xt_IDLETIMER.c
index 5ee859193783..c6acfc2d9c84 100644
--- a/net/netfilter/xt_IDLETIMER.c
+++ b/net/netfilter/xt_IDLETIMER.c
@@ -68,8 +68,6 @@ struct idletimer_tg *__idletimer_tg_find_by_label(const char *label)
{
struct idletimer_tg *entry;
- BUG_ON(!label);
-
list_for_each_entry(entry, &idletimer_tg_list, entry) {
if (!strcmp(label, entry->attr.attr.name))
return entry;
@@ -172,8 +170,6 @@ static unsigned int idletimer_tg_target(struct sk_buff *skb,
pr_debug("resetting timer %s, timeout period %u\n",
info->label, info->timeout);
- BUG_ON(!info->timer);
-
mod_timer(&info->timer->timer,
msecs_to_jiffies(info->timeout * 1000) + jiffies);