Received: by 10.213.65.68 with SMTP id h4csp455125imn; Tue, 13 Mar 2018 09:35:04 -0700 (PDT) X-Google-Smtp-Source: AG47ELsLeK7/wNhbSRm0HRtdyb6zsZ1dqy7V7s5hy2SUKexIwgaIYCK/K8IockYhk+I0lv3Y/SD+ X-Received: by 10.99.105.202 with SMTP id e193mr974067pgc.84.1520958904189; Tue, 13 Mar 2018 09:35:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520958904; cv=none; d=google.com; s=arc-20160816; b=ZWFXEPLzq6eMZjo5PVZP8ZxGaWeVw0GmUqqjxIBIVs9wnxam7OLZkmqdPp/pnT2hYJ Byh/pJmEtM/a5dB/ZWVyHP27u4D/d+Csghjridi5es+ykEmEmN+1X+88IwFdAEjHFeHv cJB9QEua5IB6ksF7kS7cGKCKDt/WlulMQzXASsOx1by28HauQS1SGazX93Dy3mskqaMz J3EAtB12vbf1FIUP5E1tBsj/ZSmTpI4U8vQW3urKHb1/+aVSUJelbfhZNV9LdVXICy7g +MMqVIKKf3c59NAyg5o2VGkEG/L7ro5J8W8T6Cz4rpBc0eJQ7cxx8idR609O5I2HEubB Xteg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=wNqKVGIFzb4umxjek83Cr8D1ip49slBsRzk2xxs1Dos=; b=uOf3ZR4rCBXwckhoDIMswBJoJsM9zlhzPWNBzKUGMj8wszGq+9QzXwLPBAhKGluJSe 4T3/0gie+LKYXXxB8kVqKQT4iOmgO5BVP3VrK2GLnnr5aTdA3mjjBqHf54+79rxuPAjl bUqlrtSVJHzgIgTuRJ6ZyJ3giC3ptOFs1wpjmxflfl+ypgw37ZwwVt3KLutZbvbPdQLH NN3RVhgINd+wgPNhKMb28S/UHcds2Ru3ViVS3PgPhHP46RuGNQz1jzQLs16CtWM7taA2 qg9neyHhgA1yK2nnkxsmc2Neli41+XPCRFYsw0/CjBayfvpfTOj2rMr9V9itH0VGOrEo 9IFg== ARC-Authentication-Results: i=1; mx.google.com; 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 t63si262967pgt.745.2018.03.13.09.34.49; Tue, 13 Mar 2018 09:35:04 -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; 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 S933427AbeCMPct (ORCPT + 99 others); Tue, 13 Mar 2018 11:32:49 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59884 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752011AbeCMPco (ORCPT ); Tue, 13 Mar 2018 11:32:44 -0400 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 293971226; Tue, 13 Mar 2018 15:32:41 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , syzkaller , Pablo Neira Ayuso Subject: [PATCH 4.15 110/146] netfilter: xt_hashlimit: fix lock imbalance Date: Tue, 13 Mar 2018 16:24:37 +0100 Message-Id: <20180313152328.902424893@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313152320.439085687@linuxfoundation.org> References: <20180313152320.439085687@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eric Dumazet commit de526f401284e1638d4c97cb5a4c292ac3f37655 upstream. syszkaller found that rcu was not held in hashlimit_mt_common() We only need to enable BH at this point. Fixes: bea74641e378 ("netfilter: xt_hashlimit: add rate match mode") Signed-off-by: Eric Dumazet Reported-by: syzkaller Signed-off-by: Pablo Neira Ayuso Signed-off-by: Greg Kroah-Hartman --- net/netfilter/xt_hashlimit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c @@ -774,7 +774,7 @@ hashlimit_mt_common(const struct sk_buff if (!dh->rateinfo.prev_window && (dh->rateinfo.current_rate <= dh->rateinfo.burst)) { spin_unlock(&dh->lock); - rcu_read_unlock_bh(); + local_bh_enable(); return !(cfg->mode & XT_HASHLIMIT_INVERT); } else { goto overlimit;