Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4809964yba; Tue, 30 Apr 2019 04:53:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqzARFjMhwuZ9shTLEe9HzijPp6l74zXJKs/Sd3RP3ItwnpZLLOa8f7mv4Mp5hjgGA5agooS X-Received: by 2002:a17:902:121:: with SMTP id 30mr66310986plb.174.1556625195860; Tue, 30 Apr 2019 04:53:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556625195; cv=none; d=google.com; s=arc-20160816; b=fcJ33k4KzI5xPUC87sku+7QyoDh7k8CDsENXpsbH92O58o+U8knWS3LHyMaI02NvhO U9pidLJXcYtcQHyzWTnk8o+vnMkvpMNfjHKsRbcomgaZg8rwla2v0Rg+tuilPfoan2lM 0Kr+qduHQvdweI5SVp3IQUZgNxFiftVqlt4oEGdrECZ/Pky0XDYiYgouz+h2M1b9GH+C J+nrOW/zJrRxqGhcXj3JM58HU1NTiBUtS6yoQhxZ3go84i8gXm/xC7udZ9llRzbC660o 3ZKv0wfGXC/XL1cEdkzXDtjTYFzt0CQCZZTetGQ3XxwSAmeqa+x5LmgiBLlup4IV2IHX BSCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XsqcBGIdVu8q95rrt11G3ekpAktjFoQU67JyeaW0GoU=; b=kgH976pi8zFU8y5OpzhDW7Opit0P4KcVW81FQIQ8CM9jHg3F6SZ8Qa5ridOTspBU0R DWmXO8bFIWi7LRO7GhCbVGMzbk1j5EE8388UyEoiUoSANFrnDKOVECa4PXXq9LLYhTyi wHRUccoCpenaJFPZ4FVstd/QSqaqn5+wkvs+CXSy82apgjl9jBICHWPy9XgOC5U6Oc2C sv5BpMy5kZivHjy2LJogzGz5TqCirXgwdBVsZF9kGMFmC6F0VI5qj8ULPFC6qg1kbiNm CmxduKipuGrZOODJCJutt/cN26cFapc9lPJNL5gyKPeURnAH7sFQsol/kNCUIekx/RS8 pv+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TLif8p8o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9si34122311pgq.347.2019.04.30.04.52.59; Tue, 30 Apr 2019 04:53:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TLif8p8o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731154AbfD3LuM (ORCPT + 99 others); Tue, 30 Apr 2019 07:50:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:37038 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728859AbfD3LuK (ORCPT ); Tue, 30 Apr 2019 07:50:10 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 06AA72054F; Tue, 30 Apr 2019 11:50:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556625009; bh=svM+Y2HiuFAb1M0zwD6TQiM/t3vsxtuu5mCdUUihXhc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TLif8p8oyMyMn38IqNlYyvouqqbIhUTtfuk19wsqqFP6V/6yii4vi4mLtyt6YcORd A09mS64y5llNO3hoX1Qwo23502H+nl7yjF7kVMRT3Dsya1BDUiqrZDgzMuW3PscK0m 98yR715e0QsNYbZQ7zwWP+pl6lRxcIs9/46JrGw0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+659574e7bcc7f7eb4df7@syzkaller.appspotmail.com, Florian Westphal , Pablo Neira Ayuso Subject: [PATCH 5.0 57/89] netfilter: ebtables: CONFIG_COMPAT: drop a bogus WARN_ON Date: Tue, 30 Apr 2019 13:38:48 +0200 Message-Id: <20190430113612.352497344@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190430113609.741196396@linuxfoundation.org> References: <20190430113609.741196396@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Florian Westphal commit 7caa56f006e9d712b44f27b32520c66420d5cbc6 upstream. It means userspace gave us a ruleset where there is some other data after the ebtables target but before the beginning of the next rule. Fixes: 81e675c227ec ("netfilter: ebtables: add CONFIG_COMPAT support") Reported-by: syzbot+659574e7bcc7f7eb4df7@syzkaller.appspotmail.com Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso Signed-off-by: Greg Kroah-Hartman --- net/bridge/netfilter/ebtables.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/net/bridge/netfilter/ebtables.c +++ b/net/bridge/netfilter/ebtables.c @@ -2032,7 +2032,8 @@ static int ebt_size_mwt(struct compat_eb if (match_kern) match_kern->match_size = ret; - if (WARN_ON(type == EBT_COMPAT_TARGET && size_left)) + /* rule should have no remaining data after target */ + if (type == EBT_COMPAT_TARGET && size_left) return -EINVAL; match32 = (struct compat_ebt_entry_mwt *) buf;