CVE-2026-142813

Source
https://cve.org/CVERecord?id=CVE-2026-142813
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142813.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-142813
Downstream
Published
2026-12-03T03:17:44Z
Modified
2026-12-03T05:00:39Z
Summary
ksmbd: use the existing xattr name for a named stream
Details

In the Linux kernel, the following vulnerability has been resolved:

ksmbd: use the existing xattr name for a named stream

SMB stream names are case-insensitive, but ksmbd stores each named stream in an xattr whose name is case-sensitive. Opening an existing stream finds its xattr with a case-insensitive match, yet the handle keeps the name as the client spelled it, and every later operation that needs an exact name uses that spelling:

  • a WRITE or an end-of-file change creates a second xattr, so a stream created as "Foo" and written through "foo" ends up stored twice, and which value a later lookup returns depends on xattr list order;
  • delete-on-close and delete-pending removal can fail with -ENODATA, or remove only a case-variant copy and leave the original;
  • the share mode check compares stream names with strcmp(), so two opens of the same stream that differ only in case do not conflict.

Have ksmbd_vfs_casexattr_len() copy the matching xattr's name into the handle when the stream is opened, so later operations use the name already on disk. The match must have the same length as the name it replaces; the stream lookup passes a length that includes the terminating NUL, which already guarantees that, and the check makes the copy safe for any caller. A stream that does not exist yet keeps the client's spelling, as before.

smb2_rename() compares and looks up fp->stream.name case-insensitively, so it behaves the same with either spelling.

Database specific
{
    "cna_assigner":  "Linux",
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142813.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9
Fixed
5c0ebca054046093684bdb48ffcbe2eb2757fd0b
Fixed
211280b953194f3f7378de13597f9fce5e0cefc1
Fixed
60269faa92542140fc318783beddf27d6edfceda
Fixed
52a8eb87416e775c6af5018dc5fc04733abedafc
Fixed
ff7debe48426132a6851378c3e3b015b117a34a4
Show 1 more event Show fewer events
Fixed
a7d1d52748e0fe4d06fdb871fc9899904fbba93f

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142813.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.15.0
Fixed
6.1.193
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.163
Type
ECOSYSTEM
Events
Introduced
6.7.0
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

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142813.json"