| From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2024-50086: ksmbd: fix user-after-free from session log off |
| |
| 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 |
| =========================== |
| |
| Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 5.15.171 with commit 0f62358ce85b2d4c949ef1b648be01b29cec667a |
| Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 6.1.114 with commit a9839c37fd813b432988f58a9d9dd59253d3eb2c |
| Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 6.6.58 with commit 5511999e9615e4318e9142d23b29bd1597befc08 |
| Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 6.11.5 with commit ee371898b53a9b9b51c02d22a8c31bfb86d45f0d |
| Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 6.12 with commit 7aa8804c0b67b3cb263a472d17f2cb50d7f1a930 |
| |
| 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/0f62358ce85b2d4c949ef1b648be01b29cec667a |
| 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 |