Received: by 10.213.65.68 with SMTP id h4csp500290imn; Fri, 16 Mar 2018 09:37:59 -0700 (PDT) X-Google-Smtp-Source: AG47ELvvWPJYhrnwLhMMhLjdUV5y2EqWb/0o/CFy0rBoLIqGF8ztTl7hBu5Y4+G4HjjUJuLWUhym X-Received: by 2002:a17:902:e83:: with SMTP id 3-v6mr2917923plx.158.1521218279652; Fri, 16 Mar 2018 09:37:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521218279; cv=none; d=google.com; s=arc-20160816; b=FFKjZdHmbcPbXEqNmPGGxtYPHtUEG0AnYSu2X7jPIRlrZ9rghPaVqodNg0mMOw2Hrn FOph1SyVLYvZvij7dvOp+7ZkEVGNv03WhEi93wq7/wVfOsZGAIQR7oWYDgn8esyEROvw pAfBujbmhEN97QHtxCBvCb7Qb6/JtMzGPskvbp7LZh+aQGQY4eb+DQPQ6zk4WQAvfj0+ lex7envMl+URaZqaW4JL3oyP5q7LYguwdgPo1dx4cT6hIEUXnaYq1zFHUI6RVxpaNsS9 6s41KioQR8XdRsiayIpmk58Oyx7eW0s2k512Un8YSDDTuMXsPBJ1Q3ff2+TDrxsZkJcm /1KQ== 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 :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=gdc8Q79A5gxILFUBVxS2zKvEuBiJbOBpjy6iAkKigTo=; b=gH9E4TtHfl8Zc7Q8evceG8ZUfr7qeFBJc+T09AzSSEd43+FwqLZ5ld7CvwnmESVtjr NBHjx1k3skLSATv8mKkQz/QqbiWm1qWqNv95HB03+loh3T/95/d76ozxFHWGSaFtkqmw C4QiqjRqCgvhD4TlAYdUT6vgBKDvu4CQ0rZLayvKst0qSYnZDqYLolMDZ63H42N4WQhN UBsM2rF/C+RwDvEYRLalPkPjGvSR0sTjkhv5CiQdcI6qmoXp2fQiYRKsssBlmKYkQTzV DblnryNh8otL6+TB+JSZicSSOHvDtOnNbWCojgOlaUSriNpLNOtneJEzWTPixOcxg7KI DDnw== 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 p64si2151660pga.492.2018.03.16.09.37.45; Fri, 16 Mar 2018 09:37:59 -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 S1753234AbeCPQgd (ORCPT + 99 others); Fri, 16 Mar 2018 12:36:33 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:34272 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752724AbeCPQgb (ORCPT ); Fri, 16 Mar 2018 12:36:31 -0400 Received: from localhost (67.110.78.66.ptr.us.xo.net [67.110.78.66]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 8564F146332B6; Fri, 16 Mar 2018 09:36:30 -0700 (PDT) Date: Fri, 16 Mar 2018 12:36:29 -0400 (EDT) Message-Id: <20180316.123629.52512148155674649.davem@davemloft.net> To: nicolas.dichtel@6wind.com Cc: ben.hutchings@codethink.co.uk, netdev@vger.kernel.org, stable@vger.kernel.org, johannes.berg@intel.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] netlink: avoid a double skb free in genlmsg_mcast() From: David Miller In-Reply-To: <20180314201023.12407-1-nicolas.dichtel@6wind.com> References: <1520899459.23626.87.camel@codethink.co.uk> <20180314201023.12407-1-nicolas.dichtel@6wind.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 16 Mar 2018 09:36:31 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicolas Dichtel Date: Wed, 14 Mar 2018 21:10:23 +0100 > nlmsg_multicast() consumes always the skb, thus the original skb must be > freed only when this function is called with a clone. > > Fixes: cb9f7a9a5c96 ("netlink: ensure to loop over all netns in genlmsg_multicast_allns()") > Reported-by: Ben Hutchings > Signed-off-by: Nicolas Dichtel Yeah these "clone until final send" loops can be tricky to manage. Good catch, applied and queued up for -stable, thanks.