Received: by 10.213.65.68 with SMTP id h4csp446122imn; Tue, 13 Mar 2018 09:17:40 -0700 (PDT) X-Google-Smtp-Source: AG47ELuIy9PbyayJG+pirG/Z/VG8m3SQ3QJPw0UZ74c2DL/I4OWiTXMxDUBndOn1EeQe4Kl/fTh9 X-Received: by 10.99.122.28 with SMTP id v28mr973710pgc.128.1520957860914; Tue, 13 Mar 2018 09:17:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520957860; cv=none; d=google.com; s=arc-20160816; b=gmDK7qO/9zb/p1Dz+3KVadXn96z7gDAzfFgURKCu/Irww0ZtmW2s8EB5bB2452lCfU NimG9dWExzlW1Lbin3G/A8hiwxx4SpEaPEGjyetuHbgvaETVy5PiJ4IIs+CIeccCVqsM vEDjAmlblYdM8ywPNUq9PAdfzQqH+nDeCwhzBdiSGrTUToGCoCVaCa5AcfIVF9sjxFvh Q2BwwplsZpAiaKyqlztaad04kuOkb0b3yHtXIxPj1NsAiihW2lF+EyktDoDy5mnHvjsT ywiNwJ0vo1/fRIsL0Ec78xvMrCIWOMs5uOt5MtelS5nTWNkicH7TosuYWgDJ4vNvnqrt /ANw== 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=tcyzTHtWfaspblRfQoz9R/oIiDYcSubRPAqcIC2F/68=; b=iY5dbqUcenL4hjO35zg7yxPhdhgSvhTseO3RO0pLtDIzyZ8EEFpDQeYipsN9AjDhdS tzIz7aP3bn5xBhosRnukYskfGRSYKiwrTt8Rw2nhVnMMyhC/nwHmp6GIDUlJ4opNXPjh YvJX03pT6tdHMj+aExvlVJRnTj/J1KjvU/RY/pqWwgrD7x3nyiqIP8gBLfQhIrgjoMiq ZrNgdh6FHc9zIW8OdT46m6+dUr9n2ZYlwOlyPLFjjuwFS4hq+0DxutbIeriS/h3jk2UN 31Hi3M0NxkVprh7gQ3auJFvPzHY8PcuHI5eZY8BcGw1UPiv5+VwWzpcoW3whcsg4KuaE kX0Q== 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 e30si262441pgn.261.2018.03.13.09.17.26; Tue, 13 Mar 2018 09:17:40 -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 S934008AbeCMPfd (ORCPT + 99 others); Tue, 13 Mar 2018 11:35:33 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:33146 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933957AbeCMPfY (ORCPT ); Tue, 13 Mar 2018 11:35:24 -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 EE92DE64; Tue, 13 Mar 2018 15:35:23 +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.14 011/140] netfilter: xt_hashlimit: fix lock imbalance Date: Tue, 13 Mar 2018 16:23:34 +0100 Message-Id: <20180313152458.875947864@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313152458.201155692@linuxfoundation.org> References: <20180313152458.201155692@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.14-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;