From patchwork Mon Jun 26 15:47:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 106348 Delivered-To: patch@linaro.org Received: by 10.140.101.48 with SMTP id t45csp161285qge; Mon, 26 Jun 2017 08:47:40 -0700 (PDT) X-Received: by 10.98.28.71 with SMTP id c68mr789985pfc.116.1498492060568; Mon, 26 Jun 2017 08:47:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498492060; cv=none; d=google.com; s=arc-20160816; b=tOZr+P004/fH/KGASxjiI7dDOKB5cTY6jpDalpU0+g9tJrLoYI6tz9PMtlWMx57a27 NanmnE6zg3ibpl/0uAm78Saf3ITl+r0YXwp6WyolshE44FvwThNN3ilGENGK0WOfSeHb QWFzO3I6+q6AzHJ42ososDRYNdtDYRmSBmPXvZBqAMlFDsXxbuL4LBsedNktYaBu8zvE dM6iUJaZ9aoMhGGN4BhVcbXlmJVx3XeCrNy/mwSTxRZhwmn+Y/k2MoNejDEm/kaH5TLA NJJESf5gH9e+9oYAk5aRqzA7Jxql3kqT7b7PKuIpDXfTDNLlt52QfQkgUQ0ZLIVM/Jh0 rivA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=M3W9EKudY8vK2KF1sicCwoDbkdRj9Ze1BSTdvhuMM3Y=; b=rEQTpfwBDCUX9YW2ggY/9qPfKycEdKk4oNJOk0pMMtZBEroaNomNgRysdIVaZrs9Mn LQHf4sQEyi1eh3dix8kfUf+cqzoP7PpXpqu1oz2oztY68N9k6RoV+uZNmBZP16EHoOeW URaIcm4FX2g5KQ5T/H+6mA+0fsxVJiaFX6H5MZE6l3YH32s+WUoOwqGnHWMBg8F1Xox4 1Uv1Iqbz6ICMAzUFU8CR5gE56cMlnBt0JmtfFFjJxkUd4Q7Oe6SMC4GSVG7/3U6jjPh5 nP6UnOSrRbZmTVttbp8ucULeoYEzurGDGmMe/GrGijg5Km80hqZ6Ig9/QYD7a//5rsWj dRpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=Sh7Q8W/5; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 63si282868plf.50.2017.06.26.08.47.36; Mon, 26 Jun 2017 08:47:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.b=Sh7Q8W/5; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751953AbdFZPr0 (ORCPT + 6 others); Mon, 26 Jun 2017 11:47:26 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:32775 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751940AbdFZPrZ (ORCPT ); Mon, 26 Jun 2017 11:47:25 -0400 Received: by mail-pf0-f176.google.com with SMTP id e7so2267830pfk.0 for ; Mon, 26 Jun 2017 08:47:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=M3W9EKudY8vK2KF1sicCwoDbkdRj9Ze1BSTdvhuMM3Y=; b=Sh7Q8W/5Teb4/t2wqMhDGfWjt4HIATIsVGfAvYlxBBRCXwcJ4+MOIP+dZdW0r/KhCs 1+OPXgF4Tqwn7e7Lp7OkwQF1ddjuv01YE0B//5pH5r7GJoYV6/DaYXxz7aGh7MauvNuA mK4SXiFMZOlWj7YBsY2wMy9w7ndbYCzYzuUDA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=M3W9EKudY8vK2KF1sicCwoDbkdRj9Ze1BSTdvhuMM3Y=; b=EOrMWimCce2SDq5/LwHURHESNiiws8J6tkRc9QRhkycaVNKYpm+E54eM9G/rvnZ3Ov iT195AMBwQ0yWhm8XOMuluZ84ZlFMfabV1BPSKeVlzExIIjPi+2OrTdIxK4sH/T79/zZ 8delvQv67It6fb2NzyzPCyLQFK1OHjrSlEWt4yNX7cb8EIGNF+r/K9tJM7TfzGF3T82g +T8TgfUrfJYktLofqxXIRzVPi1pHgFNxBZ5BGtXLIEkJ5pdmaSVDkGQV5T++aGZwzNxw SqAe8AMO0qcP6mqoCjsJUMVSPXlKQvHsLoNudVIfYCWf8gXXhtlxPDJyrYcimWRcvCv4 IZCQ== X-Gm-Message-State: AKS2vOx5p1n8elPKwUBnBSWcDxYxejyPk4ExKTU280rwlTUykqxULrG8 9AbMcZCmuwjq6XGI X-Received: by 10.84.231.139 with SMTP id g11mr825104plk.71.1498492045199; Mon, 26 Jun 2017 08:47:25 -0700 (PDT) Received: from localhost.localdomain ([106.51.139.251]) by smtp.gmail.com with ESMTPSA id s9sm829854pfe.21.2017.06.26.08.47.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Jun 2017 08:47:23 -0700 (PDT) From: Amit Pundir To: Greg KH , Guillaume Nault , "David S . Miller" Cc: Stable Subject: [PATCH for-4.9 0/5] l2tp session lookup fixes Date: Mon, 26 Jun 2017 21:17:14 +0530 Message-Id: <1498492039-26905-1-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Hi, Kindly consider/review following l2tp fixes for stable 4.9.y. This patchset fix race in l2tp sessions, avoid duplicate sessions and probable "use after free" bugs. Here is the original submission https://www.mail-archive.com/netdev@vger.kernel.org/msg161040.html Cherry-picked and build tested on Linux 4.9.34 for ARCH=x86/x86_64 + allmodconfig. Regards, Amit Pundir Guillaume Nault (5): l2tp: fix race in l2tp_recv_common() l2tp: ensure session can't get removed during pppol2tp_session_ioctl() l2tp: fix duplicate session creation l2tp: hold session while sending creation notifications l2tp: take a reference on sessions used in genetlink handlers net/l2tp/l2tp_core.c | 152 ++++++++++++++++++++++++++++++++++++++---------- net/l2tp/l2tp_core.h | 6 +- net/l2tp/l2tp_eth.c | 10 +--- net/l2tp/l2tp_ip.c | 17 ++++-- net/l2tp/l2tp_ip6.c | 18 ++++-- net/l2tp/l2tp_netlink.c | 45 +++++++++----- net/l2tp/l2tp_ppp.c | 75 +++++++++++++----------- 7 files changed, 222 insertions(+), 101 deletions(-) -- 2.7.4