blob: efa59a300065fc741d91b547ec4c3261e8f81700 [file] [log] [blame]
From bippy-7c5fe7eed585 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-2025-21994: ksmbd: fix incorrect validation for num_aces field of smb_acl
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix incorrect validation for num_aces field of smb_acl
parse_dcal() validate num_aces to allocate posix_ace_state_array.
if (num_aces > ULONG_MAX / sizeof(struct smb_ace *))
It is an incorrect validation that we can create an array of size ULONG_MAX.
smb_acl has ->size field to calculate actual number of aces in request buffer
size. Use this to check invalid num_aces.
The Linux kernel CVE team has assigned CVE-2025-21994 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 5.15.180 with commit c3a3484d9d31b27a3db0fab91fcf191132d65236
Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 6.1.132 with commit 9c4e202abff45f8eac17989e549fc7a75095f675
Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 6.6.85 with commit d0f87370622a853b57e851f7d5a5452b72300f19
Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 6.12.21 with commit a4cb17797a5d241f1e509cb5b46ed95a80c2f5fd
Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 6.13.9 with commit f6a6721802ac2f12f4c1bbe839a4c229b61866f2
Issue introduced in 5.15 with commit 0626e6641f6b467447c81dd7678a69c66f7746cf and fixed in 6.14 with commit 1b8b67f3c5e5169535e26efedd3e422172e2db64
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-2025-21994
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/smbacl.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/c3a3484d9d31b27a3db0fab91fcf191132d65236
https://git.kernel.org/stable/c/9c4e202abff45f8eac17989e549fc7a75095f675
https://git.kernel.org/stable/c/d0f87370622a853b57e851f7d5a5452b72300f19
https://git.kernel.org/stable/c/a4cb17797a5d241f1e509cb5b46ed95a80c2f5fd
https://git.kernel.org/stable/c/f6a6721802ac2f12f4c1bbe839a4c229b61866f2
https://git.kernel.org/stable/c/1b8b67f3c5e5169535e26efedd3e422172e2db64