Linux
smack: fix cred UAF in smack_file_send_sigiotask()
In the Linux kernel, the following vulnerability has been resolved: smack: fix cred UAF in smack_file_send_sigiotask() When inspecting the credentials of another task, objective credentials (->real_cred, accessed with __task_cred()) must always be used. Accessing ->cred on a non-current task is forbidden unless that task is being created or destroyed; a task is allowed to change its own ->cred pointer with no synchronization, and changing ->cred should only affect the current syscall. smack_file_send_sigiotask() was accessing both sets of credentials: First tsk->cred, then __task_cred(tsk). Fix it, always access the objective credentials here. I have tested that this bug can lead to a KASAN-reported UAF of struct cred in smack_file_send_sigiotask(), and that this fix prevents the race.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 3b11a1decef07c19443d24ae926982bc8ec9f4c0, < a512366d84e134a9eefc2cc40eeb6e80e2ec162c
- >= 3b11a1decef07c19443d24ae926982bc8ec9f4c0, < 7c7fe043f3099d0d35002b248967f75e55345b93
- >= 3b11a1decef07c19443d24ae926982bc8ec9f4c0, < f9c7b1f2b9d8f4176d2632743f51400855978ace
- >= 3b11a1decef07c19443d24ae926982bc8ec9f4c0, < b5bcf3adfa27279da4401ab8f1e1a706601a92be
- >= 3b11a1decef07c19443d24ae926982bc8ec9f4c0, < ed64aa505875a3b4defd504ee8e59e1949246a62
- >= 3b11a1decef07c19443d24ae926982bc8ec9f4c0, < b791401bf389a1546a830d2b381ca60fe94c7870
- >= 3b11a1decef07c19443d24ae926982bc8ec9f4c0, < fedc88e38ce979a720cd2de042578cb5df3dc8de
Fixed in a512366d84e134a9eefc2cc40eeb6e80e2ec162c, 7c7fe043f3099d0d35002b248967f75e55345b93, f9c7b1f2b9d8f4176d2632743f51400855978ace, b5bcf3adfa27279da4401ab8f1e1a706601a92be, ed64aa505875a3b4defd504ee8e59e1949246a62, b791401bf389a1546a830d2b381ca60fe94c7870, fedc88e38ce979a720cd2de042578cb5df3dc8de
- 2.6.29
Fixed in 0, 5.15.221, 6.1.188, 6.6.157, 6.12.109, 6.18.50, 7.2.4, 7.3
Mitigation
Upgrade Linux to a512366d84e134a9eefc2cc40eeb6e80e2ec162c or 7c7fe043f3099d0d35002b248967f75e55345b93 or f9c7b1f2b9d8f4176d2632743f51400855978ace or b5bcf3adfa27279da4401ab8f1e1a706601a92be or ed64aa505875a3b4defd504ee8e59e1949246a62 or b791401bf389a1546a830d2b381ca60fe94c7870 or fedc88e38ce979a720cd2de042578cb5df3dc8de or later.
Upgrade Linux to 0 or 5.15.221 or 6.1.188 or 6.6.157 or 6.12.109 or 6.18.50 or 7.2.4 or 7.3 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.