HIGH Introduced in 2.6.30
pipe Fasync UAF
CVE-2026-99203
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.0HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: pipe: preserve existing fasync readers on writer setup failure F_SETFL and FIOASYNC decide whether to invoke ->fasync() before pipe_fasync() takes pipe->mutex. Two enables of one O_RDWR FIFO can therefore both enter the callback. fasync_helper() allocates before checking for an existing entry. If the first enable installs both entries, a second enable can update the reader entry and then fail the allocation for the writer entry. The error path removes the pre-existing reader entry, clearing FASYNC while the writer entry remains registered. __fput() then skips ->fasync(), so a later pipe notification can dereference the freed file or its f_owner. An unprivileged memory-pressure reproducer triggers a KASAN slab-use-after-free in send_sigio() through this path. Keep the reader helper's result and undo the registration only if this call added it. The pipe mutex serializes changes to both lists, so a failed new registration still removes its reader, while a failed duplicate preserves the existing registrations and FASYNC. Successful duplicate enables continue to update fa_fd as before.
02KernelScan AI Analysis
Risk summary
An unprivileged local user can trigger a use-after-free in the pipe FASYNC mechanism by racing two concurrent enable operations on an O_RDWR FIFO under memory pressure. This leads to kernel memory corruption, allowing privilege escalation or denial of service. The bug is reachable from containers and any environment where untrusted code can create pipes or FIFOs.
Vulnerability analysis
When a file descriptor is opened with O_RDWR on a FIFO, both reader and writer asynchronous notification entries can be registered. The fasync_helper() function allocates memory before checking for an existing entry. If two threads simultaneously enable FASYNC on the same O_RDWR FIFO, the first may install both entries while the second updates the reader entry but then fails to allocate for the writer entry. The error path incorrectly removes the pre-existing reader entry, clearing the FASYNC flag while the writer entry remains registered. Later, when the file is closed, __fput() skips the fasync cleanup because FASYNC is cleared, leaving a dangling writer entry. A subsequent pipe notification then dereferences the freed file structure or its f_owner, causing a use-after-free. The fix preserves the result of the reader registration and only rolls it back if the current call actually added it, so a failed duplicate enable leaves existing registrations intact.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 2.6.30 | 5.10.273 | 6041bcd185d4 |
| 5.15 | 2.6.30 | 5.15.224 | 7cdbfa22a7e2 |
| 6.1 | 2.6.30 | 6.1.191 | 22c7f57b0c0b |
| 6.12 | 2.6.30 | 6.12.115 | 9b0aa2a1d8df |
| 6.18 | 2.6.30 | 6.18.59 | 4c42ce499ce4 |
| 6.6 | 2.6.30 | 6.6.161 | 94be790dd6fb |
| 7.2 | 2.6.30 | 7.2.13 | 2259809e5b70 |
| mainline | 2.6.30 | 7.3 | 40bb03d3ea6f |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Affected — no CIP fix yet (latest 6.12.114-cip34) |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.190-cip62) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |
| cip/5.10 | Affected — no CIP fix yet (latest 5.10.272-cip79) |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.272-cip79-rt35) |
| cip/4.19 | Affected — no CIP fix yet (latest 4.19.325-cip136) |
| cip/4.19-rt | Affected — no CIP fix yet (latest 4.19.325-cip136-rt50) |
| cip/4.4 | Affected — no CIP fix yet (latest 4.4.302-cip115) |
| cip/4.4-rt | Affected — no CIP fix yet (latest 4.4.302-cip115-rt63) |