{"id":"CVE-2022-49366","summary":"ksmbd: fix reference count leak in smb_check_perm_dacl()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix reference count leak in smb_check_perm_dacl()\n\nThe issue happens in a specific path in smb_check_perm_dacl(). When\n\"id\" and \"uid\" have the same value, the function simply jumps out of\nthe loop without decrementing the reference count of the object\n\"posix_acls\", which is increased by get_acl() earlier. This may\nresult in memory leaks.\n\nFix it by decreasing the reference count of \"posix_acls\" before\njumping to label \"check_access_bits\".","modified":"2026-04-02T08:27:31.536605Z","published":"2025-02-26T02:11:11.250Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49366.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/248d71b440aef829f5cc5f6545ca113ef5062900"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9758a6653c27867d810de02b4e5697163dda9883"},{"type":"WEB","url":"https://git.kernel.org/stable/c/cf824b95c12a1abacadbc2d069931963221a3414"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d21a580dafc69aa04f46e6099616146a536b0724"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49366.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49366"},{"type":"PACKAGE","url":"https://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":"777cad1604d68ed4379ec899d1f7d2f6a29f01f0"},{"fixed":"cf824b95c12a1abacadbc2d069931963221a3414"},{"fixed":"248d71b440aef829f5cc5f6545ca113ef5062900"},{"fixed":"9758a6653c27867d810de02b4e5697163dda9883"},{"fixed":"d21a580dafc69aa04f46e6099616146a536b0724"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49366.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}