CVE-2026-142790
smb: client: fix OOB read in the SMB_FIND_FILE_UNIX name scan
Mitigation
- No fix listed yet: follow the vendor advisory.
Who should check
- Anyone running Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 318f8316852f3f0780aa14b0ec66d5fe06b19b15; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 5bab3beacb28f13bb883aea30e489dd32557401a; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 408054cbb7e43bb83e518d1c0278d8c8c7c06982; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < b2817ed0d16c168aa5349f7e4b3af2b8f7ff39b6; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 9615d78d537db9e7599f55b8ad1f061e29ed1f11; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < fa0c2f082946917c3f07d2475c8ce73a8c96d0e2
- Anyone running Linux 2.6.12
Vulnerability facts
- Affected
- Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 318f8316852f3f0780aa14b0ec66d5fe06b19b15; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 5bab3beacb28f13bb883aea30e489dd32557401a; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 408054cbb7e43bb83e518d1c0278d8c8c7c06982; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < b2817ed0d16c168aa5349f7e4b3af2b8f7ff39b6; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 9615d78d537db9e7599f55b8ad1f061e29ed1f11; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < fa0c2f082946917c3f07d2475c8ce73a8c96d0e2; Linux 2.6.12
- Fixed in
- Linux 318f8316852f3f0780aa14b0ec66d5fe06b19b15, Linux 5bab3beacb28f13bb883aea30e489dd32557401a, Linux 408054cbb7e43bb83e518d1c0278d8c8c7c06982, Linux 9615d78d537db9e7599f55b8ad1f061e29ed1f11
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Unknown
- CVSS
- Not scored yet
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: smb: client: fix OOB read in the SMB_FIND_FILE_UNIX name scan cifs_fill_dirent_unix() finds the length of an SMB_FIND_FILE_UNIX entry name by scanning for its terminating NUL, over up to PATH_MAX + 1 UTF-16 units in cifs_unicode_bytelen() or PATH_MAX bytes in strnlen(). Neither scan knows where the response ends. cifs_fill_dirent() only requires the fixed part of the entry to fit, so the name can start exactly at the end of the received data, and a name that holds no terminator is then scanned for 8194 bytes, or 4096 bytes without unicode, past the end of the received data. SendReceive() copies at most 16468 bytes into the 16588-byte cifs_request allocation, so for a response of that length up to 8074 of the bytes scanned lie past the end of the allocation. Before the preceding patches bounded where the entry starts, the entry itself could start up to 820 bytes past the end of the allocation at the default CIFSMaxBufSize, and its name 928 bytes past it, so all 8194 scanned bytes would lie outside. cifs_fill_dirent() rejects the name afterwards because it extends past the end of the response, so nothing of what was read is used, but the out-of-bounds read itself remains. SMB_FIND_FILE_UNIX is only used with SMB1 servers that offer the Unix extensions; SMB1 is not negotiated by default and requires an explicit vers=1.0 mount. Before the preceding patches, an entry placed past the buffer left the scan out of bounds from its first read. They bound where the entry starts, but nothing bounds the scan, so a name that holds no terminator still runs off the end of the allocation. Reproduced on the unpatched tree with KASAN enabled, for an entry that starts inside the response, which is the case the preceding patches leave open: ================================================================== BUG: KASAN: slab-out-of-bounds in cifs_save_resume_key.isra.0+0x75c/0x7f0 Read of size 2 at addr ffff88807ee640cc by task ls/84 CPU: 0 UID: 0 PID: 84 Comm: ls Not tainted 7.3.0-rc4-00457-gf14572c203d5 #69 PREEMPT(lazy) Call Trace: <TASK> kasan_report+0xdf/0x1a0 cifs_save_resume_key.isra.0+0x75c/0x7f0 cifs_readdir+0x1ed6/0x29c0 iterate_dir+0x1c0/0x570 __x64_sys_getdents64+0x133/0x270 do_syscall_64+0x109/0x5d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f </TASK> Allocated by task 84 on cpu 1 at 15.751078s: cifs_buf_get+0x36/0x90 smb_init+0x4f/0x110 CIFSFindNext+0xf7/0x14c0 cifs_readdir+0xf51/0x29c0 The buggy address belongs to the object at ffff88807ee60000 which belongs to the cache cifs_request of size 16588 The buggy address is located 0 bytes to the right of allocated 16588-byte region [ffff88807ee60000, ffff88807ee640cc) ================================================================== The two bytes read there are one UTF-16 unit of the scan, at the first byte past the end of the object. The scan carries on from there, reported again 2, 4 and 6 bytes to the right. Pass the number of bytes that follow the fixed part of the entry to cifs_fill_dirent_unix() and stop both scans there. A scan that reaches the end of the response without finding a terminator now fails: it returns a name that ends exactly at the end of the response and would otherwise pass the bound, so cifs_fill_dirent() requires the position of the terminator of an SMB_FIND_FILE_UNIX name to lie inside the response as well. Accepting such a name truncated at the end of the response would turn a malformed entry into a directory entry, or a resume name, that no server sent. A name longer than the PATH_MAX cap of the scans is still truncated there, as before, when the response extends past the cap. The message cifs_unicode_bytelen() logs when it finds no terminator now covers both limits. This patch depends on "smb: client: fix OOB read of the resume name sent in TRANS2_FIND_NEXT2", which adds the end argument of cifs_fill_dirent() and the length it deri ---truncated---
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 318f8316852f3f0780aa14b0ec66d5fe06b19b15; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 5bab3beacb28f13bb883aea30e489dd32557401a; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 408054cbb7e43bb83e518d1c0278d8c8c7c06982; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < b2817ed0d16c168aa5349f7e4b3af2b8f7ff39b6; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 9615d78d537db9e7599f55b8ad1f061e29ed1f11; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < fa0c2f082946917c3f07d2475c8ce73a8c96d0e2 | — | cvelist |
| Linux | 2.6.12 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-142790. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-142790.md Affected: Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 318f8316852f3f0780aa14b0ec66d5fe06b19b15; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 5bab3beacb28f13bb883aea30e489dd32557401a; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 408054cbb7e43bb83e518d1c0278d8c8c7c06982; >= 1da177e4c3f41524e886b7f… Fixed in: Linux 318f8316852f3f0780aa14b0ec66d5fe06b19b15, Linux 5bab3beacb28f13bb883aea30e489dd32557401a, Linux 408054cbb7e43bb83e518d1c0278d8c8c7c06982, Linux 9615d78d537db9e7599f55b8ad1f061e29ed1f11 Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
Technologies
References
Other
- https://git.kernel.org/stable/c/318f8316852f3f0780aa14b0ec66d5fe06b19b15
- https://git.kernel.org/stable/c/5bab3beacb28f13bb883aea30e489dd32557401a
- https://git.kernel.org/stable/c/408054cbb7e43bb83e518d1c0278d8c8c7c06982
- https://git.kernel.org/stable/c/b2817ed0d16c168aa5349f7e4b3af2b8f7ff39b6
- https://git.kernel.org/stable/c/9615d78d537db9e7599f55b8ad1f061e29ed1f11
- https://git.kernel.org/stable/c/fa0c2f082946917c3f07d2475c8ce73a8c96d0e2
FAQ
Is CVE-2026-142790 being exploited?
There is no confirmed exploitation: CVE-2026-142790 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.
How serious is CVE-2026-142790?
It has no CVSS score yet. Unknown.
Which versions are affected by CVE-2026-142790?
Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 318f8316852f3f0780aa14b0ec66d5fe06b19b15; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 5bab3beacb28f13bb883aea30e489dd32557401a; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 408054cbb7e43bb83e518d1c0278d8c8c7c06982; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < b2817ed0d16c168aa5349f7e4b3af2b8f7ff39b6; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 9615d78d537db9e7599f55b8ad1f061e29ed1f11; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < fa0c2f082946917c3f07d2475c8ce73a8c96d0e2; Linux 2.6.12.
Is there a fix for CVE-2026-142790?
Yes. Fixed in Linux 318f8316852f3f0780aa14b0ec66d5fe06b19b15, Linux 5bab3beacb28f13bb883aea30e489dd32557401a, Linux 408054cbb7e43bb83e518d1c0278d8c8c7c06982, Linux 9615d78d537db9e7599f55b8ad1f061e29ed1f11. No fix listed yet: follow the vendor advisory.
How do I check if I'm affected by CVE-2026-142790?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.
More Linux kernel vulnerabilities
See all| Severity | Identifier / vulnerability | Technology | Signals | Age |
|---|---|---|---|---|
| UNSCORED | CVE-2026-142948 i2c: designware: queue only one read command for block reads | Linux kernel | ||
| UNSCORED | CVE-2026-142947 cxl/core: Skip einj_inject creation when devm_add_action_or_reset() fails | Linux kernel | ||
| UNSCORED | CVE-2026-142946 ASoC: amd: acp-es8336: Switch to use acpi_bus_get_primary_device() | Linux kernel | ||
| UNSCORED | CVE-2026-142945 ASoC: amd: acp3x-es83xx: Switch to use acpi_bus_get_primary_device() | Linux kernel | ||
| UNSCORED | CVE-2026-142944 ASoC: amd: acp-es8336: Use an owned codec device reference | Linux kernel |