Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F051839A048 for ; Thu, 25 Jun 2026 09:46:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782380798; cv=none; b=d7NGmz5ZGMEghL7EB8gHl0fpKLaVpsbpxR+GxrPd66SYILIzyXcd8YLC2PolbcZ/NIhI3nOQ/gs5e+dnOIx+DIlYSJhjUcVL7f19j4k0URapa5CJET0ShI19ZLPLQ5r5IKO8U/tDJTivGH/Bvlq9CXmfThtzlzuJI3X17KQ3Rgg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782380798; c=relaxed/simple; bh=bh31LOvFT1FePhgd1xRLCPOMp2ZJBg45AmrTYVQqTN4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=t0uxbnRqHISy2CsSUa6boRfDYjNu86IO5YpUWCBP00zz5RehcOKcaHzg6ruJqsylM2e92dp7525GN2AAGO/XwN5Xi2kIuonFg5+s9nzbxIog89XwVCAGT0wWOTUi8ks3VI6SakT6S/37mVjIWxEp45esCLPA4UXifOUz0PaR9DI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0s8OOzCh; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="0s8OOzCh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5FD251F000E9; Thu, 25 Jun 2026 09:46:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1782380796; bh=zYWqUNjE46Rn8xpygJz7RWMIlo6sj1Y6mWCD2sGx2pI=; h=From:To:Cc:Subject:Date:Reply-To; b=0s8OOzChkD5cwF0V0jEG625H2roPlVWGpRs1rznOPVpE304PmIqAX7RvF0Z8J5X8H NYkXKVSHvknXfPr/L9Ehwc1CFPnGejxEHVON4ND6eS6e6VYYsNo72YdLyd7++d+iZc WOSZEne8CH8CeJlUWb5teZHkdN+nrpHrzWzzj1ao= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-53262: l2tp: pppol2tp: hold reference to session in pppol2tp_ioctl() Date: Thu, 25 Jun 2026 09:41:50 +0100 Message-ID: <2026062516-CVE-2026-53262-3892@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3360; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=/ihj6dm1hmllyf/gWsNrHSH3EeOS+fqWfrM/gAqqaUA=; b=owGbwMvMwCRo6H6F97bub03G02pJDFk2Lwu2XWspuPzmwZ/9am8/bn/CPPefmf7eSwyS2+Zap pxb/+vHso5YFgZBJgZZMUWWL9t4ju6vOKToZWh7GmYOKxPIEAYuTgGYSI8Fw4KeZgv/r2aRzJvr JqctSg0NX3/ww1+GeTqhq8LKY8Nby1bErVhypuAP49PyuQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: l2tp: pppol2tp: hold reference to session in pppol2tp_ioctl() pppol2tp_ioctl() read sock->sk->sk_user_data directly without any locks or reference counting. If a controllable sleep was induced during copy_from_user() (e.g. via a userfaultfd page fault sleep), a concurrent socket close could trigger pppol2tp_session_close() asynchronously. This frees the l2tp_session structure via the l2tp_session_del_work workqueue. Upon resuming, the ioctl thread dereferences the stale session pointer, resulting in a Use-After-Free (UAF). Fix this by securely fetching the session reference using the RCU-safe, refcounted helper pppol2tp_sock_to_session(sk) on entry. This locks the session's refcount across the sleep. We structured the function to exit via standard err breaks, guaranteeing that l2tp_session_put() is cleanly called on all return paths to drop the reference. To preserve existing behavior we validate the session and its magic signature only for the specific L2TP commands that require it. This ensures that generic/unknown ioctls called on an unconnected socket still return -ENOIOCTLCMD and correctly fall back to generic handlers (e.g. in sock_do_ioctl()). The Linux kernel CVE team has assigned CVE-2026-53262 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.35 with commit fd558d186df2c13a22455373858bae634a4795af and fixed in 6.12.94 with commit 78cdfdca88cbf731a92f3b9ee5427c633dd94e28 Issue introduced in 2.6.35 with commit fd558d186df2c13a22455373858bae634a4795af and fixed in 6.18.36 with commit e251d4cdfc725c9e7d686161e3b775a0e7d95053 Issue introduced in 2.6.35 with commit fd558d186df2c13a22455373858bae634a4795af and fixed in 7.0.13 with commit 62f327e287cf7b595ae3f73ba72f5cd2a9e9f39f Issue introduced in 2.6.35 with commit fd558d186df2c13a22455373858bae634a4795af and fixed in 7.1 with commit a213a8950414c684999dcf03edeea6c46ede172e Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-53262 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: net/l2tp/l2tp_ppp.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/78cdfdca88cbf731a92f3b9ee5427c633dd94e28 https://git.kernel.org/stable/c/e251d4cdfc725c9e7d686161e3b775a0e7d95053 https://git.kernel.org/stable/c/62f327e287cf7b595ae3f73ba72f5cd2a9e9f39f https://git.kernel.org/stable/c/a213a8950414c684999dcf03edeea6c46ede172e