ksmbd: use check_add_overflow() to prevent u16 DACL size overflow
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 · < 299f962c0b02d048fb45d248b4da493d03f3175d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: use check_add_overflow() to prevent u16 DACL size overflow
set_posix_acl_entries_dacl() and set_ntacl_dacl() accumulate ACE sizes in u16 variables. When a file has many POSIX ACL entries, the accumulated size can wrap past 65535, causing the pointer arithmetic (char *)pndace + *size to land within already-written ACEs. Subsequent writes then overwrite earlier entries, and pndacl->size gets a truncated value.
Use check_add_overflow() at each accumulation point to detect the wrap before it corrupts the buffer, consistent with existing check_mul_overflow() usage elsewhere in smbacl.c.
From the CVE record · Linux
The Linux kernel’s ksmbd DACL-handling code can overflow a 16-bit size when a file has many POSIX ACL entries. Subsequent writes can overwrite earlier entries and leave a truncated DACL size. The input does not specify how an attacker could trigger this or whether authentication or user interaction is required.
Engineers running Linux kernels with ksmbd should check their versions; affected versions are not specified.