Skip to content
Heist/ feed
Back to feed
HighFix available

ksmbd: fix incorrect validation for num_aces field of smb_acl

Type: advisorySources: OSV

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.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.15.180, 6.1.132, 6.12.21, 6.13.9, 6.6.85
CVEs
CVE-2025-21994
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 13:40 UTC · Revision 1

Source evidence

ksmbd: fix incorrect validation for num_aces field of smb_acl

core-osv · Original source

Published 2 Apr 2025, 14:00 UTC

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.

osv:CVE-2025-21994

Kernel

Fixed versions: 5.15.180, 6.1.132, 6.6.85, 6.12.21, 6.13.9

Complete source record
{
  "id": "85dc413332e6e97724eab41e1619cfa8868ae84a7d7e211204f25807f545b208",
  "url": "https://osv.dev/vulnerability/CVE-2025-21994",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ksmbd: fix incorrect validation for num_aces field of smb_acl",
    "summary": "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.",
    "evidence": "osv:CVE-2025-21994",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.15.180",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.132",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.85",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.21",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.13.9",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2025-21994",
      "aliases": [
        "CVE-2025-21994"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0626e6641f6b467447c81dd7678a69c66f7746cf"
                },
                {
                  "fixed": "c3a3484d9d31b27a3db0fab91fcf191132d65236"
                },
                {
                  "fixed": "9c4e202abff45f8eac17989e549fc7a75095f675"
                },
                {
                  "fixed": "d0f87370622a853b57e851f7d5a5452b72300f19"
                },
                {
                  "fixed": "a4cb17797a5d241f1e509cb5b46ed95a80c2f5fd"
                },
                {
                  "fixed": "f6a6721802ac2f12f4c1bbe839a4c229b61866f2"
                },
                {
                  "fixed": "1b8b67f3c5e5169535e26efedd3e422172e2db64"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21994.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.15.0"
                },
                {
                  "fixed": "5.15.180"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.132"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.85"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.21"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.13.9"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21994.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:29.210509269Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/1b8b67f3c5e5169535e26efedd3e422172e2db64",
        "https://git.kernel.org/stable/c/9c4e202abff45f8eac17989e549fc7a75095f675",
        "https://git.kernel.org/stable/c/a4cb17797a5d241f1e509cb5b46ed95a80c2f5fd",
        "https://git.kernel.org/stable/c/c3a3484d9d31b27a3db0fab91fcf191132d65236",
        "https://git.kernel.org/stable/c/d0f87370622a853b57e851f7d5a5452b72300f19",
        "https://git.kernel.org/stable/c/f6a6721802ac2f12f4c1bbe839a4c229b61866f2",
        "https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21994.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-21994",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21994.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-21994",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 495994,
  "published_at": "2025-04-02T14:00:37.407+00:00"
}