ksmbd: fix reference count leak in smb_check_perm_dacl()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix reference count leak in smb_check_perm_dacl()
The issue happens in a specific path in smb_check_perm_dacl(). When "id" and "uid" have the same value, the function simply jumps out of the loop without decrementing the reference count of the object "posix_acls", which is increased by get_acl() earlier. This may result in memory leaks.
Fix it by decreasing the reference count of "posix_acls" before jumping to label "check_access_bits".
From the CVE record · Linux
A reference count leak in the Linux kernel's ksmbd smb_check_perm_dacl() function can cause memory leaks when `id` and `uid` have the same value. The input does not specify how an attacker could trigger this path or whether authentication or user interaction is required.
Teams running Linux kernels with ksmbd should check their installations; affected versions are not specified.