Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp527279yba; Mon, 1 Apr 2019 11:06:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxYwG8j79SgYuz/RHWTv1rObd6+HRcmY5m4kkZFjg7tdnQIPQF6EaHzp3dhRO55thi4r95U X-Received: by 2002:a65:4108:: with SMTP id w8mr62033548pgp.236.1554141967821; Mon, 01 Apr 2019 11:06:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554141967; cv=none; d=google.com; s=arc-20160816; b=Lxlfdxr5/zhHL7Q8byUrc6sdKa320mV1xFog1k6ebNYNKNwVpJIRInBSQPQYhyIQvK 2edTTiiorvxtHlZnqRJXaYkn91Zos0tCcOtaxkzTjmZ4B/XJVYCub8SGfBwsLIQOaGNS VMmdukgegEaF7PBpW4DoZ2OE/eTL/Jv+OwD12G3Bz5RJRSv4DaapLTDTy39LNBA9gLO+ a8TJRqqAAm/il719o1fBLjjhUI0ulOLYgi0AiLGArn9BqXIwtsXy1m357hbQLNyTA7fO Nj1FqzfAAcpzSdyqQsmMSjya+FlBFSzoq87FVu6Mtq9jWhx1qj2BoMlkfnwjZmdzkZV+ Ecxw== 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; bh=qhi5GpY7ItmFA8xZ7oET9ktOyaDjIvwPeVPgQo5XDmY=; b=BTtQPmIxjZGLHB7dbiza4l8NUthsr+eZkU56kYZbd0Cspy+3xq/Us+5uqK8kbDKPyl UBZbVohNMAbNhFsPt63JsFlpRfJQHX62y+ZMHp+E5BnJl5Y555jZfqqX44X5Cep6NP0P m/CtbqxzGosGM9/EjeBUqNGWtyKnEm/hhXpLoDhqnhORFKqCbug3vw6wG/nNAzE7625x Cv6vBfA8b9UBkx0Icn06TEJFgGlCyd54g301FG+ybgC6wBlDdTnqQwk6zk4OddKqMwh3 PC1mEnh5GQ8qH6pj2IU4/5YryQc1tpUoClsqKq0qTe4UxVoeClCoeWIFZjPHAiqeT1QU NeEw== 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 i8si9120478pfa.97.2019.04.01.11.05.52; Mon, 01 Apr 2019 11:06:07 -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 S1730490AbfDARNI (ORCPT + 99 others); Mon, 1 Apr 2019 13:13:08 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:32950 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730470AbfDARNG (ORCPT ); Mon, 1 Apr 2019 13:13:06 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::d71]) (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 5E80B14B8AF60; Mon, 1 Apr 2019 10:13:06 -0700 (PDT) Date: Mon, 01 Apr 2019 10:12:34 -0700 (PDT) Message-Id: <20190401.101234.1259757550586433319.davem@davemloft.net> To: edumazet@google.com Cc: dust.li@linux.alibaba.com, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, caspar@linux.alibaba.com Subject: Re: [PATCH] tcp: fix a potential NULL pointer dereference in tcp_sk_exit From: David Miller In-Reply-To: References: <20190401080453.87465-1-dust.li@linux.alibaba.com> X-Mailer: Mew version 6.8 on Emacs 26.1 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]); Mon, 01 Apr 2019 10:13:06 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Dumazet Date: Mon, 1 Apr 2019 02:23:39 -0700 > On Mon, Apr 1, 2019 at 1:05 AM dust.li wrote: >> >> From: Dust Li >> >> When tcp_sk_init() failed in inet_ctl_sock_create(), >> 'net->ipv4.tcp_congestion_control' will be left >> uninitialized, but tcp_sk_exit() hasn't check for >> that. >> >> This patch add checking on 'net->ipv4.tcp_congestion_control' >> in tcp_sk_exit() to prevent NULL-ptr dereference. >> >> Signed-off-by: Dust Li > > Fixes: 6670e1524477 ("tcp: Namespace-ify sysctl_tcp_default_congestion_control") > Signed-off-by: Eric Dumazet This patch didn't make it to the list for whatever reason, but I applied it and have it queued up for -stable. Thanks.