CVE-2026-99749: ksmbd: enforce the read-only share flag when creating a stream
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: enforce the read-only share flag when creating a stream
When a share is read-only, smb2open() rejects opens that would create or truncate a file. Creating a named stream on an existing file with streamsxattr sets neither OCREAT nor OTRUNC, so it passes this check, and smb2setstreamnamexattr() then creates the stream. On a Time Machine share, opening a missing AFPAfpInfo stream also writes one. A user who can write a file at the filesystem level can therefore add streams to it through a read-only share.
Do not create a stream or synthesize AFPAfpInfo when the share is not writable. Existing streams still open normally, and a missing stream opened with FILEOPEN still returns STATUSOBJECTNAMENOTFOUND.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.5-1
Event History
Frequently Asked Questions
Who can exploit this issue?
An attacker needs filesystem-level permission to write the target file and access to it through a ksmbd read-only share. The issue affects attempts to add named streams to an existing file, including the AFP_AfpInfo stream behavior on Time Machine shares.
Are existing named streams blocked on a read-only share?
No. Existing streams continue to open normally. The fix prevents creating a missing stream or synthesizing AFP_AfpInfo when the share is not writable.
What behavior should indicate the fix is in effect?
Opening a missing stream with FILE_OPEN should return STATUS_OBJECT_NAME_NOT_FOUND. A read-only share should not create a named stream or write a missing AFP_AfpInfo stream.