In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix reference count leak in smbcheckperm_dacl()
The issue happens in a specific path in smbcheckpermdacl(). When "id" and "uid" have the same value, the function simply jumps out of the loop without decrementing the reference count of the object "posixacls", which is increased by get_acl() earlier. This may result in memory leaks.
Fix it by decreasing the reference count of "posixacls" before jumping to label "checkaccess_bits".
{ "vanir_signatures": [ { "deprecated": false, "signature_type": "Function", "target": { "file": "fs/ksmbd/smbacl.c", "function": "smb_check_perm_dacl" }, "signature_version": "v1", "digest": { "length": 3514.0, "function_hash": "172407665383429625181771961879386860149" }, "id": "CVE-2022-49366-11de613e", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@248d71b440aef829f5cc5f6545ca113ef5062900" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "fs/ksmbd/smbacl.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "338426003681001266937215302121916074439", "53010526558815056170227076501527462417", "182118564173347301115413045328399053891", "232596863942170675832387021107395408964" ], "threshold": 0.9 }, "id": "CVE-2022-49366-241a23e7", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9758a6653c27867d810de02b4e5697163dda9883" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "fs/ksmbd/smbacl.c", "function": "smb_check_perm_dacl" }, "signature_version": "v1", "digest": { "length": 3514.0, "function_hash": "172407665383429625181771961879386860149" }, "id": "CVE-2022-49366-64ced5a7", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9758a6653c27867d810de02b4e5697163dda9883" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "fs/ksmbd/smbacl.c", "function": "smb_check_perm_dacl" }, "signature_version": "v1", "digest": { "length": 3514.0, "function_hash": "172407665383429625181771961879386860149" }, "id": "CVE-2022-49366-6a62998b", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d21a580dafc69aa04f46e6099616146a536b0724" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "fs/ksmbd/smbacl.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "338426003681001266937215302121916074439", "53010526558815056170227076501527462417", "182118564173347301115413045328399053891", "232596863942170675832387021107395408964" ], "threshold": 0.9 }, "id": "CVE-2022-49366-91a3177d", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cf824b95c12a1abacadbc2d069931963221a3414" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "fs/ksmbd/smbacl.c", "function": "smb_check_perm_dacl" }, "signature_version": "v1", "digest": { "length": 3514.0, "function_hash": "172407665383429625181771961879386860149" }, "id": "CVE-2022-49366-b5c6ac80", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cf824b95c12a1abacadbc2d069931963221a3414" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "fs/ksmbd/smbacl.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "338426003681001266937215302121916074439", "53010526558815056170227076501527462417", "182118564173347301115413045328399053891", "232596863942170675832387021107395408964" ], "threshold": 0.9 }, "id": "CVE-2022-49366-de33d7d9", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d21a580dafc69aa04f46e6099616146a536b0724" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "fs/ksmbd/smbacl.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "338426003681001266937215302121916074439", "53010526558815056170227076501527462417", "182118564173347301115413045328399053891", "232596863942170675832387021107395408964" ], "threshold": 0.9 }, "id": "CVE-2022-49366-f2901a2d", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@248d71b440aef829f5cc5f6545ca113ef5062900" } ] }