Upstream information
Description
In the Linux kernel, the following vulnerability has been resolved:apparmor: fix cred UAF caused by begin_current_label_crit_section()
AppArmor's begin_current_label_crit_section() is a scary function called
from lots of LSM hooks (in particular VFS/socket-related ones) that checks
if the label referenced by the current creds is marked FLAG_STALE, and if
so, attempts to use aa_replace_current_label() to replace the creds with an
updated version that uses a new label.
The first problem with this is that it would directly lead to UAF of
`struct cred` if anything in the kernel takes a pointer to the current
creds and accesses these past a security hook invocation that replaces
creds, like so:
```
const struct cred *cred = current_cred();
alloc_file_pseudo(...);
uid_t uid = cred->euid;
```
I don't know if anything in the kernel actually does this, but I think it
is very surprising that this pattern could lead to UAF.
The second problem is that things go wrong when aa_replace_current_label()
runs with overridden credentials. aa_replace_current_label() bails out if
`current_cred() != current_real_cred()` (mirroring the check in
proc_pid_attr_write()), but this check can't actually reliably detect
overridden credentials because the overridden creds can be the same as the
objective creds.
So in approximately the following scenario, things go wrong:
1. task begins with <creds A> (as both objective and subjective creds),
with refcount=2
2. task grabs an extra reference on <creds A> for overriding
3. task calls override_creds(<creds A>), which returns a pointer to the old
subjective creds (<creds A>)
4. task enters AppArmor LSM hook
5. AppArmor checks that objective/subjective creds are equal
6. AppArmor replaces both cred pointers with <creds B> and drops 2 refs on
<creds A>
7. task leaves AppArmor LSM hook
8. task calls revert_creds(<creds A>)
9. now task->cred is <creds A> while task->real_cred is <creds B>, but the
task_struct logically holds two references to <creds B>
10. another task drops the extra reference on <creds A> that was used for
overriding, refcount drops to 0
11. now task->real_cred points to freed creds
At this point, any access to current_cred() will be UAF.
I have a test case where I run aa-disable on a profile while a process
using that profile is blocked on splice() from a FUSE passthrough file into
a full pipe; after the profile update, the pipe becomes empty, splice()
resumes, the credentials go out of sync, and a subsequent getuid() syscall
results in a KASAN UAF splat.
To fix this, instead of directly replacing creds, do it via task_work that
will run at the end of the current syscall. (The point in time at which the
cred replacement happens should have no correctness impact; it is just a
performance optimization to avoid unnecessarily touching the refcount of
the new label.)
Note that AppArmor still performs direct cred replacements in the
sb_pivotroot LSM hook after this change, and that direct cred replacements
can still happen in VFS ->write() callbacks via proc_pid_attr_write().
There are two options for what to do with aa_dup_task_ctx(): Either
explicitly reset new->label_replacement_pending after the entire
aa_task_ctx has been copied, or switch to manually copying members over.
I am switching to manually copying members over because that should make
bugs more obvious.
SUSE information
Overall state of this security issue: New
This issue is currently rated as having moderate severity.
Note from the SUSE Security Team on the kernel-default package
SUSE will no longer fix all CVEs in the Linux Kernel anymore, but declare some bug classes as won't fix. Please refer to TID 21496 for more details. No SUSE Bugzilla entries cross referenced. No SUSE Security Announcements cross referenced.Status of this issue by product and package
Please note that this evaluation state might be work in progress, incomplete or outdated. Also information for service packs in the LTSS phase is only included for issues meeting the LTSS criteria. If in doubt, feel free to contact us for clarification. The updates are grouped by state of their lifecycle. SUSE product lifecycles are documented on the lifecycle page.
| Product(s) | Source package | State |
|---|---|---|
| Products under general support and receiving all security fixes. | ||
| SUSE Linux Enterprise Desktop 15 SP7 | kernel-default | Analysis |
| SUSE Linux Enterprise Desktop 15 SP7 | kernel-source | Analysis |
| SUSE Linux Enterprise High Availability Extension 15 SP7 | kernel-default | Analysis |
| SUSE Linux Enterprise High Availability Extension 15 SP7 | kernel-source | Analysis |
| SUSE Linux Enterprise High Availability Extension 16.0 | kernel-default | Analysis |
| SUSE Linux Enterprise High Availability Extension 16.0 | kernel-source | Analysis |
| SUSE Linux Enterprise High Availability Extension 16.1 | kernel-default | Analysis |
| SUSE Linux Enterprise High Availability Extension 16.1 | kernel-source | Analysis |
| SUSE Linux Enterprise Micro 5.3 | kernel-default | Analysis |
| SUSE Linux Enterprise Micro 5.3 | kernel-rt | Analysis |
| SUSE Linux Enterprise Micro 5.3 | kernel-source | Analysis |
| SUSE Linux Enterprise Micro 5.3 | kernel-source-rt | Analysis |
| SUSE Linux Enterprise Micro 5.4 | kernel-default | Analysis |
| SUSE Linux Enterprise Micro 5.4 | kernel-rt | Analysis |
| SUSE Linux Enterprise Micro 5.4 | kernel-source | Analysis |
| SUSE Linux Enterprise Micro 5.4 | kernel-source-rt | Analysis |
| SUSE Linux Enterprise Micro 5.5 | kernel-default | Analysis |
| SUSE Linux Enterprise Micro 5.5 | kernel-source | Analysis |
| SUSE Linux Enterprise Micro 5.5 | kernel-source-rt | Analysis |
| SUSE Linux Enterprise Module for Basesystem 15 SP7 | kernel-default | Analysis |
| SUSE Linux Enterprise Module for Basesystem 15 SP7 | kernel-source | Analysis |
| SUSE Linux Enterprise Module for Development Tools 15 SP7 | kernel-default | Analysis |
| SUSE Linux Enterprise Module for Development Tools 15 SP7 | kernel-source | Analysis |
| SUSE Linux Enterprise Real Time 15 SP7 | kernel-source-rt | Analysis |
| SUSE Linux Enterprise Server 15 SP7 | kernel-default | Analysis |
| SUSE Linux Enterprise Server 15 SP7 | kernel-source | Analysis |
| SUSE Linux Enterprise Server 16.0 | kernel-default | Analysis |
| SUSE Linux Enterprise Server 16.0 | kernel-source | Analysis |
| SUSE Linux Enterprise Server 16.1 | kernel-default | Analysis |
| SUSE Linux Enterprise Server 16.1 | kernel-source | Analysis |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | kernel-default | Analysis |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | kernel-source | Analysis |
| SUSE Linux Enterprise Server for SAP applications 16.0 | kernel-default | Analysis |
| SUSE Linux Enterprise Server for SAP applications 16.0 | kernel-source | Analysis |
| SUSE Linux Enterprise Server for SAP applications 16.1 | kernel-default | Analysis |
| SUSE Linux Enterprise Server for SAP applications 16.1 | kernel-source | Analysis |
| SUSE Linux Enterprise Workstation Extension 15 SP7 | kernel-default | Analysis |
| SUSE Linux Enterprise Workstation Extension 15 SP7 | kernel-source | Analysis |
| SUSE Linux Micro 6.0 | kernel-default | Analysis |
| SUSE Linux Micro 6.0 | kernel-source | Analysis |
| SUSE Linux Micro 6.0 | kernel-source-rt | Analysis |
| SUSE Linux Micro 6.1 | kernel-default | Analysis |
| SUSE Linux Micro 6.1 | kernel-source | Analysis |
| SUSE Linux Micro 6.1 | kernel-source-rt | Analysis |
| SUSE Linux Micro 6.2 | kernel-default | Analysis |
| SUSE Linux Micro 6.2 | kernel-source | Analysis |
| SUSE Linux Micro Extras 6.0 | kernel-default | Analysis |
| SUSE Linux Micro Extras 6.0 | kernel-source | Analysis |
| SUSE Linux Micro Extras 6.0 | kernel-source-rt | Analysis |
| SUSE Linux Micro Extras 6.1 | kernel-default | Analysis |
| SUSE Linux Micro Extras 6.1 | kernel-source | Analysis |
| SUSE Real Time Module 15 SP7 | kernel-source-rt | Analysis |
| openSUSE Leap 16.0 | kernel-source | Analysis |
| Products under Long Term Service Pack support and receiving important and critical security fixes. | ||
| SUSE Linux Enterprise High Performance Computing 12 SP5 | kernel-source | Analysis |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | kernel-default | Analysis |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | kernel-source | Analysis |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | kernel-source | Analysis |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | kernel-default | Analysis |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | kernel-source | Analysis |
| SUSE Linux Enterprise Module for Basesystem 15 SP4 | kernel-source | Analysis |
| SUSE Linux Enterprise Module for Basesystem 15 SP5 | kernel-source | Analysis |
| SUSE Linux Enterprise Module for Basesystem 15 SP6 | kernel-source | Analysis |
| SUSE Linux Enterprise Module for Development Tools 15 SP4 | kernel-source | Analysis |
| SUSE Linux Enterprise Module for Development Tools 15 SP5 | kernel-source | Analysis |
| SUSE Linux Enterprise Module for Development Tools 15 SP6 | kernel-source | Analysis |
| SUSE Linux Enterprise Server 11 SP4 LTSS EXTREME CORE | kernel-default | Analysis |
| SUSE Linux Enterprise Server 11 SP4 LTSS EXTREME CORE | kernel-source | Analysis |
| SUSE Linux Enterprise Server 12 SP5 | kernel-source | Analysis |
| SUSE Linux Enterprise Server 12 SP5-LTSS | kernel-default | Analysis |
| SUSE Linux Enterprise Server 12 SP5-LTSS | kernel-source | Analysis |
| SUSE Linux Enterprise Server 15 SP4 | kernel-source | Analysis |
| SUSE Linux Enterprise Server 15 SP4-LTSS | kernel-default | Analysis |
| SUSE Linux Enterprise Server 15 SP4-LTSS | kernel-source | Analysis |
| SUSE Linux Enterprise Server 15 SP5 | kernel-source | Analysis |
| SUSE Linux Enterprise Server 15 SP5-LTSS | kernel-default | Analysis |
| SUSE Linux Enterprise Server 15 SP5-LTSS | kernel-source | Analysis |
| SUSE Linux Enterprise Server 15 SP6 | kernel-source | Analysis |
| SUSE Linux Enterprise Server 15 SP6-LTSS | kernel-default | Analysis |
| SUSE Linux Enterprise Server 15 SP6-LTSS | kernel-source | Analysis |
| SUSE Linux Enterprise Server LTSS Extended Security 12 SP5 | kernel-default | Analysis |
| SUSE Linux Enterprise Server LTSS Extended Security 12 SP5 | kernel-source | Analysis |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | kernel-default | Analysis |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | kernel-source | Analysis |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | kernel-default | Analysis |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | kernel-source | Analysis |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | kernel-default | Analysis |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | kernel-source | Analysis |
| Products past their end of life and not receiving proactive updates anymore. | ||
| SUSE CaaS Platform 4.0 | kernel-source | Analysis |
| SUSE Enterprise Storage 6 | kernel-source | Analysis |
| SUSE Enterprise Storage 7 | kernel-source | Analysis |
| SUSE Enterprise Storage 7.1 | kernel-source | Analysis |
| SUSE Linux Enterprise Desktop 11 SP4 | kernel-source | Analysis |
| SUSE Linux Enterprise Desktop 15 SP1 | kernel-source | Analysis |
| SUSE Linux Enterprise Desktop 15 SP2 | kernel-source | Analysis |
| SUSE Linux Enterprise Desktop 15 SP3 | kernel-source | Analysis |
| SUSE Linux Enterprise Desktop 15 SP4 | kernel-source | Analysis |
| SUSE Linux Enterprise Desktop 15 SP5 | kernel-source | Analysis |
| SUSE Linux Enterprise Desktop 15 SP6 | kernel-source | Analysis |
| SUSE Linux Enterprise High Performance Computing 15 SP1 | kernel-source | Analysis |
| SUSE Linux Enterprise High Performance Computing 15 SP1-ESPOS | kernel-source | Analysis |
| SUSE Linux Enterprise High Performance Computing 15 SP1-LTSS | kernel-source | Analysis |
| SUSE Linux Enterprise High Performance Computing 15 SP2 | kernel-source | Analysis |
| SUSE Linux Enterprise High Performance Computing 15 SP2-ESPOS | kernel-source | Analysis |
| SUSE Linux Enterprise High Performance Computing 15 SP2-LTSS | kernel-source | Analysis |
| SUSE Linux Enterprise High Performance Computing 15 SP3 | kernel-source | Analysis |
| SUSE Linux Enterprise High Performance Computing 15 SP3-ESPOS | kernel-source | Analysis |
| SUSE Linux Enterprise High Performance Computing 15 SP3-LTSS | kernel-source | Analysis |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | kernel-source | Analysis |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | kernel-source | Analysis |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | kernel-source | Analysis |
| SUSE Linux Enterprise Micro 5.0 | kernel-default | Analysis |
| SUSE Linux Enterprise Micro 5.1 | kernel-default | Analysis |
| SUSE Linux Enterprise Micro 5.2 | kernel-default | Analysis |
| SUSE Linux Enterprise Micro 5.2 | kernel-source | Analysis |
| SUSE Linux Enterprise Module for Basesystem 15 SP1 | kernel-source | Analysis |
| SUSE Linux Enterprise Module for Basesystem 15 SP2 | kernel-source | Analysis |
| SUSE Linux Enterprise Module for Basesystem 15 SP3 | kernel-source | Analysis |
| SUSE Linux Enterprise Module for Development Tools 15 SP1 | kernel-source | Analysis |
| SUSE Linux Enterprise Module for Development Tools 15 SP2 | kernel-source | Analysis |
| SUSE Linux Enterprise Module for Development Tools 15 SP3 | kernel-source | Analysis |
| SUSE Linux Enterprise Real Time 15 SP2 | kernel-source | Analysis |
| SUSE Linux Enterprise Real Time 15 SP3 | kernel-source | Analysis |
| SUSE Linux Enterprise Real Time 15 SP4 | kernel-source | Analysis |
| SUSE Linux Enterprise Real Time 15 SP4 | kernel-source-rt | Analysis |
| SUSE Linux Enterprise Real Time 15 SP5 | kernel-source-rt | Analysis |
| SUSE Linux Enterprise Server 11 SP4 | kernel-source | Analysis |
| SUSE Linux Enterprise Server 11 SP4-LTSS | kernel-source | Analysis |
| SUSE Linux Enterprise Server 15 SP1 | kernel-source | Analysis |
| SUSE Linux Enterprise Server 15 SP1-BCL | kernel-source | Analysis |
| SUSE Linux Enterprise Server 15 SP1-LTSS | kernel-default | Analysis |
| SUSE Linux Enterprise Server 15 SP1-LTSS | kernel-source | Analysis |
| SUSE Linux Enterprise Server 15 SP2 | kernel-source | Analysis |
| SUSE Linux Enterprise Server 15 SP2-BCL | kernel-source | Analysis |
| SUSE Linux Enterprise Server 15 SP2-LTSS | kernel-default | Analysis |
| SUSE Linux Enterprise Server 15 SP2-LTSS | kernel-source | Analysis |
| SUSE Linux Enterprise Server 15 SP3 | kernel-source | Analysis |
| SUSE Linux Enterprise Server 15 SP3-BCL | kernel-source | Analysis |
| SUSE Linux Enterprise Server 15 SP3-LTSS | kernel-default | Analysis |
| SUSE Linux Enterprise Server 15 SP3-LTSS | kernel-source | Analysis |
| SUSE Linux Enterprise Server for SAP Applications 15 SP1 | kernel-source | Analysis |
| SUSE Linux Enterprise Server for SAP Applications 15 SP2 | kernel-source | Analysis |
| SUSE Linux Enterprise Server for SAP Applications 15 SP3 | kernel-source | Analysis |
| SUSE Manager Proxy 4.0 | kernel-source | Analysis |
| SUSE Manager Proxy 4.1 | kernel-source | Analysis |
| SUSE Manager Proxy 4.2 | kernel-source | Analysis |
| SUSE Manager Proxy 4.3 | kernel-source | Analysis |
| SUSE Manager Proxy LTS 4.3 | kernel-source | Analysis |
| SUSE Manager Retail Branch Server 4.0 | kernel-source | Analysis |
| SUSE Manager Retail Branch Server 4.1 | kernel-source | Analysis |
| SUSE Manager Retail Branch Server 4.2 | kernel-source | Analysis |
| SUSE Manager Retail Branch Server 4.3 | kernel-source | Analysis |
| SUSE Manager Retail Branch Server LTS 4.3 | kernel-source | Analysis |
| SUSE Manager Server 4.0 | kernel-source | Analysis |
| SUSE Manager Server 4.1 | kernel-source | Analysis |
| SUSE Manager Server 4.2 | kernel-source | Analysis |
| SUSE Manager Server 4.3 | kernel-source | Analysis |
| SUSE Manager Server LTS 4.3 | kernel-source | Analysis |
| SUSE Real Time Module 15 SP4 | kernel-source-rt | Analysis |
| SUSE Real Time Module 15 SP5 | kernel-source-rt | Analysis |
| openSUSE Leap 15.3 | kernel-source | Analysis |
| openSUSE Leap 15.4 | kernel-source | Analysis |
| openSUSE Leap 15.4 | kernel-source-rt | Analysis |
| openSUSE Leap 15.5 | kernel-source | Analysis |
| openSUSE Leap 15.5 | kernel-source-rt | Analysis |
| openSUSE Leap 15.6 | kernel-source | Analysis |
SUSE Timeline for this CVE
CVE page created: Sat Sep 12 12:54:04 2026CVE page last modified: Sat Sep 12 21:44:49 2026