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 4209A4A28 for ; Tue, 29 Oct 2024 00:51:30 +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=1730163090; cv=none; b=KIgG3szBFXuEtvLGER43EjJyjhZUOdpIkn00Ea0iETlZK6LiAkavdrUiEfZJgYhYEjxZQkVATDePwnXdlUHRvJ/gU3r9EmuoEk0AxwnI8lxEVnWrgSVBRhw4nOtLwjkKIcX4B+XiM/mCgvaWXsdsdORJF17VLbYCly6UyT8ZiP0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730163090; c=relaxed/simple; bh=WQAYwOrSnCsBfFMtXf7zSLxU/+TCVEDYlRh0PWToO3Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=JnYHlqXEWwxNG4M0Ci73kAfvzxp80o7tJa9v3lVoOqmO9CE3NXl+Ua8SJlyC8PHCr4hl13FzRvkQcQ041CSJv7cWZSFs6BQzI2NRDgoo6MtngkGsZou4IiiiAZbM40/X+agVxf0VZd2EIFlDpv8EORLDjsNObIbhrkJbDstL164= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=e6l8Y7AZ; 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="e6l8Y7AZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C30CCC4CEC3; Tue, 29 Oct 2024 00:51:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1730163090; bh=WQAYwOrSnCsBfFMtXf7zSLxU/+TCVEDYlRh0PWToO3Q=; h=From:To:Cc:Subject:Date:Reply-to:From; b=e6l8Y7AZaKV7eBX6e5P2ONGG0MnF5wqnR3fpw+5P4+jxVWqo6C0rZUHRO9lvnnDqa jRb3xkuNyuuP7ijYLAku4TfOzKiv5NkkTnl/rANIcwwcKI9M6m0GR9e0zn/xVXGvIG vhZMAboqC87jvnm+XUACTERARF2i7ehW6+VPwIDc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50086: ksmbd: fix user-after-free from session log off Date: Tue, 29 Oct 2024 01:50:49 +0100 Message-ID: <2024102938-CVE-2024-50086-8134@gregkh> X-Mailer: git-send-email 2.47.0 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=2136; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=WQAYwOrSnCsBfFMtXf7zSLxU/+TCVEDYlRh0PWToO3Q=; b=owGbwMvMwCRo6H6F97bub03G02pJDOkKhnHbWj6xFk27oeHrPPv9ngQF0/rey61/rMt+sk4R2 9nIdOZoRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEyEaT/DPKOjUZeF1255xTUt YZ7OqdwNxbcLfjEsaHfsfPlQ7+t+SxnJqWGFD085fLf+CQA= 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: ksmbd: fix user-after-free from session log off There is racy issue between smb2 session log off and smb2 session setup. It will cause user-after-free from session log off. This add session_lock when setting SMB2_SESSION_EXPIRED and referece count to session struct not to free session while it is being used. The Linux kernel CVE team has assigned CVE-2024-50086 to this issue. Affected and fixed versions =========================== Fixed in 6.1.114 with commit a9839c37fd81 Fixed in 6.6.58 with commit 5511999e9615 Fixed in 6.11.5 with commit ee371898b53a Fixed in 6.12-rc4 with commit 7aa8804c0b67 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-2024-50086 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: fs/smb/server/mgmt/user_session.c fs/smb/server/mgmt/user_session.h fs/smb/server/server.c fs/smb/server/smb2pdu.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/a9839c37fd813b432988f58a9d9dd59253d3eb2c https://git.kernel.org/stable/c/5511999e9615e4318e9142d23b29bd1597befc08 https://git.kernel.org/stable/c/ee371898b53a9b9b51c02d22a8c31bfb86d45f0d https://git.kernel.org/stable/c/7aa8804c0b67b3cb263a472d17f2cb50d7f1a930