{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "0752f1522a9120f731232919f7ad904e9e22b8ce"
            },
            {
              "fixed": "9bb37c10bbd57a4a2b7fa61f7c4af479225d0c11"
            },
            {
              "fixed": "daee49d7a51f1edb062581d49684c9cbfb3d7dc9"
            },
            {
              "fixed": "d6074ea8379b4bee953883f3bfa684cbc284eeeb"
            },
            {
              "fixed": "570c783a96f054dd3ac409a92772e9afb705d21c"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        },
        {
          "events": [
            {
              "introduced": "bc15485e6a3cd20829cfa58bc9111e0bfc9cf303"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        },
        {
          "events": [
            {
              "introduced": "282333bd7f759cdd9362e793b85db08780516416"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        },
        {
          "events": [
            {
              "introduced": "92fa67e9260a65f69d868c4fcc92c9cee428c6f9"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "2.6.25.19"
            },
            {
              "fixed": "2.6.26"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "2.6.26.7"
            },
            {
              "fixed": "2.6.27"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "2.6.27.2"
            },
            {
              "fixed": "2.6.28"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "2.6.28"
            },
            {
              "fixed": "6.12.117"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.13.0"
            },
            {
              "fixed": "6.18.61"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "7.3.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99427.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix OOB last_entry pointer from unbounded LastNameOffset\n\nCIFSFindFirst() and CIFSFindNext() locate the last entry of a\nTRANS2_FIND_FIRST2 or TRANS2_FIND_NEXT2 response by adding the\nLastNameOffset of the response parameters to the start of the data\narea, and store the result in psrch_inf-\u003elast_entry. MS-CIFS 2.2.6.2.2\ndefines that offset as the offset of the entry's file name; the client\nfollows the reading of NT and Samba servers, which point it at the\nentry. LastNameOffset is only checked against CIFSMaxBufSize, which\nsays nothing about the response actually received: validate_t2() lets\nthe data area start up to 1024 bytes into the buffer, and SendReceive()\ncopies at most CIFSMaxBufSize + MAX_CIFS_HDR_SIZE bytes of a response,\n16468 by default, into a cifs_request allocation of CIFSMaxBufSize +\nMAX_SMB2_HDR_SIZE bytes, 16588 by default. The pointer itself can\ntherefore be placed anywhere from the end of the received data to 820\nbytes past the end of the allocation.\n\nThe read through that pointer is far larger than its displacement.\nfind_cifs_entry() hands last_entry to cifs_save_resume_key() after every\nFindNext and after the FindFirst of a search rewind, and\ncifs_fill_dirent() takes the length of the name from the entry itself: a\n__le32 FileNameLength for most levels, a __u8 for\nSMB_FIND_FILE_INFO_STANDARD, and for SMB_FIND_FILE_UNIX the result of a\nscan for the terminating NUL over up to PATH_MAX + 1 UTF-16 units. The\nname is recorded as the resume name of the search, and the next\nCIFSFindNext() rejects only a recorded length of PATH_MAX or more before\ncopying the name into the ResumeFileName of its request and sending it\nwith the resume key taken from the same entry: up to 4 KiB of memory\nfrom past the end of the allocation leaks to the server, and for\nSMB_FIND_FILE_UNIX the NUL scan runs about twice as far before the\nlength is even known. The entry does not have to lie outside the\nresponse for that either: a maximal response ends about 120 bytes before\nthe end of the allocation, so an entry in its last bytes with a name\njust under PATH_MAX has nearly all of that name copied from past the\nallocation.\n\nIt needs nothing unusual from the client: a FindNext response that\nreports no entries and does not end the search makes find_cifs_entry()\nsend the next FindNext at once, carrying whatever was parsed at\nLastNameOffset, and a search rewind can do the same after its\nFindFirst. SMB1 is not negotiated by default: this takes a malicious\nor compromised server, a mount of it with an explicit vers=1.0, which\nCONFIG_CIFS_ALLOW_INSECURE_LEGACY (default y) permits, and a directory\nlisting on that mount.\n\nWith KASAN enabled, a response that places the last entry past the\nbuffer, with a large DataOffset and a LastNameOffset near the end of\nits range, gives:\n\n ==================================================================\n BUG: KASAN: slab-out-of-bounds in cifs_save_resume_key.isra.0+0x7aa/0x7f0\n Read of size 4 at addr ffff88807b55c33b by task ls/83\n\n CPU: 1 UID: 0 PID: 83 Comm: ls Not tainted 7.3.0-rc4-00457-gf14572c203d5 #69 PREEMPT(lazy)\n Call Trace:\n  \u003cTASK\u003e\n  kasan_report+0xdf/0x1a0\n  cifs_save_resume_key.isra.0+0x7aa/0x7f0\n  cifs_readdir+0x1ed6/0x29c0\n  iterate_dir+0x1c0/0x570\n  __x64_sys_getdents64+0x133/0x270\n  do_syscall_64+0x109/0x5d0\n  entry_SYSCALL_64_after_hwframe+0x77/0x7f\n  \u003c/TASK\u003e\n\n Allocated by task 83 on cpu 0 at 19.317556s:\n  cifs_buf_get+0x36/0x90\n  smb_init+0x4f/0x110\n  CIFSFindNext+0xf7/0x14c0\n  cifs_readdir+0xf51/0x29c0\n\n The buggy address belongs to the object at ffff88807b558000\n  which belongs to the cache cifs_request of size 16588\n The buggy address is located 623 bytes to the right of\n  allocated 16588-byte region [ffff88807b558000, ffff88807b55c0cc)\n ==================================================================\n\nThe four bytes read there are the FileNameLength of the entry, which\ncifs_fill_dirent() tak\n---truncated---",
  "id": "CVE-2026-99427",
  "modified": "2026-11-19T16:46:05.868144114Z",
  "published": "2026-11-19T14:40:37.965Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/570c783a96f054dd3ac409a92772e9afb705d21c"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/9bb37c10bbd57a4a2b7fa61f7c4af479225d0c11"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/d6074ea8379b4bee953883f3bfa684cbc284eeeb"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/daee49d7a51f1edb062581d49684c9cbfb3d7dc9"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99427.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-99427"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "smb: client: fix OOB last_entry pointer from unbounded LastNameOffset"
}