Re: [PATCH] ksmbd: rate limit the log for a failed security descriptor store

From: Namjae Jeon

Date: Thu Nov 19 2026 - 06:00:12 EST


On Thu, Nov 19, 2026 at 12:58 AM Ian Bridges <icb@xxxxxxxxxxxx> wrote:
>
> ksmbd_vfs_set_sd_xattr() logs every failed store with pr_err(), with no
> rate limit and without the file name. A client can make the store fail
> at will. It only has to send a descriptor larger than the xattr space
> the filesystem has for the file. On the ext4 filesystem with 4 KiB
> blocks used in testing, a DACL of 86 ACEs was already too large. Each
> SET_INFO or CREATE that carries such a DACL then writes an error line
> to the kernel log.
>
> When smb2_open() stores the default security descriptor of a new file,
> it logs the same failure a second time.
>
> Log the failure with pr_warn_ratelimited() and include the file name.
> Drop the second message in smb2_open().
>
> Signed-off-by: Ian Bridges <icb@xxxxxxxxxxxx>
Applied it to #ksmbd-for-next.
Thanks!