{"api_version":"1","generated_at":"2026-11-25T14:02:07+00:00","cve":"CVE-2026-99427","urls":{"html":"https://cve.report/CVE-2026-99427","api":"https://cve.report/api/cve/CVE-2026-99427.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-99427","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-99427"},"summary":{"title":"smb: client: fix OOB last_entry pointer from unbounded LastNameOffset","description":"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->last_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  <TASK>\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  </TASK>\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---","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-19 15:17:55","updated_at":"2026-11-23 08:17:46"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/f9545b63ec9a58dbca0b9ac48424e263b776842d","name":"https://git.kernel.org/stable/c/f9545b63ec9a58dbca0b9ac48424e263b776842d","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/daee49d7a51f1edb062581d49684c9cbfb3d7dc9","name":"https://git.kernel.org/stable/c/daee49d7a51f1edb062581d49684c9cbfb3d7dc9","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/729ad2e6e48a6bc8a688027746955014499b76fc","name":"https://git.kernel.org/stable/c/729ad2e6e48a6bc8a688027746955014499b76fc","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/570c783a96f054dd3ac409a92772e9afb705d21c","name":"https://git.kernel.org/stable/c/570c783a96f054dd3ac409a92772e9afb705d21c","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/c6c79b3ba7ce4d94f1d49e7b44010dca3b601b9c","name":"https://git.kernel.org/stable/c/c6c79b3ba7ce4d94f1d49e7b44010dca3b601b9c","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/d6074ea8379b4bee953883f3bfa684cbc284eeeb","name":"https://git.kernel.org/stable/c/d6074ea8379b4bee953883f3bfa684cbc284eeeb","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/9181a0429c8c457a1231f6b50edd7a8e0ef6058f","name":"https://git.kernel.org/stable/c/9181a0429c8c457a1231f6b50edd7a8e0ef6058f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/9bb37c10bbd57a4a2b7fa61f7c4af479225d0c11","name":"https://git.kernel.org/stable/c/9bb37c10bbd57a4a2b7fa61f7c4af479225d0c11","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-99427","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99427","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 0752f1522a9120f731232919f7ad904e9e22b8ce f9545b63ec9a58dbca0b9ac48424e263b776842d git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 0752f1522a9120f731232919f7ad904e9e22b8ce 9181a0429c8c457a1231f6b50edd7a8e0ef6058f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 0752f1522a9120f731232919f7ad904e9e22b8ce 729ad2e6e48a6bc8a688027746955014499b76fc git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 0752f1522a9120f731232919f7ad904e9e22b8ce c6c79b3ba7ce4d94f1d49e7b44010dca3b601b9c git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 0752f1522a9120f731232919f7ad904e9e22b8ce 9bb37c10bbd57a4a2b7fa61f7c4af479225d0c11 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 0752f1522a9120f731232919f7ad904e9e22b8ce daee49d7a51f1edb062581d49684c9cbfb3d7dc9 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 0752f1522a9120f731232919f7ad904e9e22b8ce d6074ea8379b4bee953883f3bfa684cbc284eeeb git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 0752f1522a9120f731232919f7ad904e9e22b8ce 570c783a96f054dd3ac409a92772e9afb705d21c git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected bc15485e6a3cd20829cfa58bc9111e0bfc9cf303 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 282333bd7f759cdd9362e793b85db08780516416 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 92fa67e9260a65f69d868c4fcc92c9cee428c6f9 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2.6.25.19 2.6.26 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2.6.26.7 2.6.27 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2.6.27.2 2.6.28 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2.6.28","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 2.6.28 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10.275 5.10.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.226 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.193 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.117 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.61 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.2 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"99427","cve":"CVE-2026-99427","epss":"0.002200000","percentile":"0.126240000","score_date":"2026-11-23","updated_at":"2026-11-24 00:07:46"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["fs/smb/client/cifssmb.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"f9545b63ec9a58dbca0b9ac48424e263b776842d","status":"affected","version":"0752f1522a9120f731232919f7ad904e9e22b8ce","versionType":"git"},{"lessThan":"9181a0429c8c457a1231f6b50edd7a8e0ef6058f","status":"affected","version":"0752f1522a9120f731232919f7ad904e9e22b8ce","versionType":"git"},{"lessThan":"729ad2e6e48a6bc8a688027746955014499b76fc","status":"affected","version":"0752f1522a9120f731232919f7ad904e9e22b8ce","versionType":"git"},{"lessThan":"c6c79b3ba7ce4d94f1d49e7b44010dca3b601b9c","status":"affected","version":"0752f1522a9120f731232919f7ad904e9e22b8ce","versionType":"git"},{"lessThan":"9bb37c10bbd57a4a2b7fa61f7c4af479225d0c11","status":"affected","version":"0752f1522a9120f731232919f7ad904e9e22b8ce","versionType":"git"},{"lessThan":"daee49d7a51f1edb062581d49684c9cbfb3d7dc9","status":"affected","version":"0752f1522a9120f731232919f7ad904e9e22b8ce","versionType":"git"},{"lessThan":"d6074ea8379b4bee953883f3bfa684cbc284eeeb","status":"affected","version":"0752f1522a9120f731232919f7ad904e9e22b8ce","versionType":"git"},{"lessThan":"570c783a96f054dd3ac409a92772e9afb705d21c","status":"affected","version":"0752f1522a9120f731232919f7ad904e9e22b8ce","versionType":"git"},{"status":"affected","version":"bc15485e6a3cd20829cfa58bc9111e0bfc9cf303","versionType":"git"},{"status":"affected","version":"282333bd7f759cdd9362e793b85db08780516416","versionType":"git"},{"status":"affected","version":"92fa67e9260a65f69d868c4fcc92c9cee428c6f9","versionType":"git"},{"lessThan":"2.6.26","status":"affected","version":"2.6.25.19","versionType":"semver"},{"lessThan":"2.6.27","status":"affected","version":"2.6.26.7","versionType":"semver"},{"lessThan":"2.6.28","status":"affected","version":"2.6.27.2","versionType":"semver"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["fs/smb/client/cifssmb.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"2.6.28"},{"lessThan":"2.6.28","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.10.*","status":"unaffected","version":"5.10.275","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.226","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.193","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.117","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.61","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.2","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.275","versionStartIncluding":"2.6.28","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.226","versionStartIncluding":"2.6.28","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.193","versionStartIncluding":"2.6.28","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"2.6.28","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.117","versionStartIncluding":"2.6.28","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.61","versionStartIncluding":"2.6.28","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.2","versionStartIncluding":"2.6.28","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"2.6.28","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25.19","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.26.7","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.27.2","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"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->last_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  <TASK>\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  </TASK>\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---"}],"providerMetadata":{"dateUpdated":"2026-11-23T08:02:39.127Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/f9545b63ec9a58dbca0b9ac48424e263b776842d"},{"url":"https://git.kernel.org/stable/c/9181a0429c8c457a1231f6b50edd7a8e0ef6058f"},{"url":"https://git.kernel.org/stable/c/729ad2e6e48a6bc8a688027746955014499b76fc"},{"url":"https://git.kernel.org/stable/c/c6c79b3ba7ce4d94f1d49e7b44010dca3b601b9c"},{"url":"https://git.kernel.org/stable/c/9bb37c10bbd57a4a2b7fa61f7c4af479225d0c11"},{"url":"https://git.kernel.org/stable/c/daee49d7a51f1edb062581d49684c9cbfb3d7dc9"},{"url":"https://git.kernel.org/stable/c/d6074ea8379b4bee953883f3bfa684cbc284eeeb"},{"url":"https://git.kernel.org/stable/c/570c783a96f054dd3ac409a92772e9afb705d21c"}],"title":"smb: client: fix OOB last_entry pointer from unbounded LastNameOffset","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-99427","datePublished":"2026-11-19T14:40:37.965Z","dateReserved":"2026-09-25T10:25:14.414Z","dateUpdated":"2026-11-23T08:02:39.127Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-19 15:17:55","lastModifiedDate":"2026-11-23 08:17:46","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"99427","Ordinal":"1","Title":"smb: client: fix OOB last_entry pointer from unbounded LastNameO","CVE":"CVE-2026-99427","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"99427","Ordinal":"1","NoteData":"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->last_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  <TASK>\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  </TASK>\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---","Type":"Description","Title":"smb: client: fix OOB last_entry pointer from unbounded LastNameO"}]}}}