Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 246793B784 for ; Wed, 19 Jun 2024 14:55:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718808910; cv=none; b=Do245nXKzc1lDeIzLqrNr3MbKqA5b9U8iR2QMR3F21JvtUZrwwZFpApr0ejuUt7bGWIU3DdMStVmCmCK4G5BlphVD2CYHPYIdjejKGr7tYHZ56ykG0ukj1FOYL55qgaGeyKvOn0Zy5EicjMRDqmY40egsWRgDhDo37+n4llgkKA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718808910; c=relaxed/simple; bh=zxZE4ABhLQC/xsGLBXtlR8RO1TiiSxYhljYQe9yeih4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=owbPhIGAjWwNB1gqY+jTxABTHXO1sPZJYkp8PpY/VMJeg4qhKQFYeb7JkS1uyh9duc0oiauSkmZa+8lofHms2R8vOS5zx0ZonDnRFZJsOxWTG+EVkwwP80jqsV+01vuwl28WWA/VI82WbBCzBHY+nE1NsfX1g01JLfoMbx12s9o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=m373R3te; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="m373R3te" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 964E5C2BBFC; Wed, 19 Jun 2024 14:55:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718808910; bh=zxZE4ABhLQC/xsGLBXtlR8RO1TiiSxYhljYQe9yeih4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=m373R3te8p793RT3MsW+/ceuppLiMOun+nIOvpzGrThvhFpPPtai7Fc58Xvl01Xio YDrHnrK10dgh+xqC59mQYttq9BuWRPIehd9tQZCRIcXP1MczUM2Hom/oy9H39q/1xA f80Dkseom3x+++KWB/IwSoGw1J5jB2pUHSj2Rwqo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47593: mptcp: clear 'kern' flag from fallback sockets Date: Wed, 19 Jun 2024 16:54:32 +0200 Message-ID: <2024061919-CVE-2021-47593-a7a7@gregkh> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2348; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=zxZE4ABhLQC/xsGLBXtlR8RO1TiiSxYhljYQe9yeih4=; b=owGbwMvMwCRo6H6F97bub03G02pJDGlFH2X2f5+syaRm+r/+OPPmhztrNwfanVV2X1N/UXwjT xv3tnXaHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjAR0b8MCxbf2DWHcUGz++Zv qqp/DjHoSCa2HmSYw9Vm++PW6xrl/kAOS+7y8H77bTceAAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: mptcp: clear 'kern' flag from fallback sockets The mptcp ULP extension relies on sk->sk_sock_kern being set correctly: It prevents setsockopt(fd, IPPROTO_TCP, TCP_ULP, "mptcp", 6); from working for plain tcp sockets (any userspace-exposed socket). But in case of fallback, accept() can return a plain tcp sk. In such case, sk is still tagged as 'kernel' and setsockopt will work. This will crash the kernel, The subflow extension has a NULL ctx->conn mptcp socket: BUG: KASAN: null-ptr-deref in subflow_data_ready+0x181/0x2b0 Call Trace: tcp_data_ready+0xf8/0x370 [..] The Linux kernel CVE team has assigned CVE-2021-47593 to this issue. Affected and fixed versions =========================== Issue introduced in 5.6 with commit cf7da0d66cc1 and fixed in 5.10.88 with commit 451f1eded7f5 Issue introduced in 5.6 with commit cf7da0d66cc1 and fixed in 5.15.11 with commit c26ac0ea3a91 Issue introduced in 5.6 with commit cf7da0d66cc1 and fixed in 5.16 with commit d6692b3b97bd 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-2021-47593 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/mptcp/protocol.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/451f1eded7f56e93aaf52eb547ba97742d9c0e97 https://git.kernel.org/stable/c/c26ac0ea3a91c210cf90452e625dc441adf3e549 https://git.kernel.org/stable/c/d6692b3b97bdc165d150f4c1505751a323a80717