CVE-2026-139090: watch_queue: keep info_id separate from rcu_head
In the Linux kernel, the following vulnerability has been resolved:
watchqueue: keep infoid separate from rcuhead
struct watch overlays infoid with rcuhead. A notification poster reads infoid under rcureadlock(), but a concurrent final put can enqueue the watch with callrcu(). Enqueueing the callback writes rcuhead before the grace period has elapsed, so it can corrupt infoid while the object remains legally visible to the reader.
postwatchnotification() then merges that value into the notification info word without masking it. Pointer bits can corrupt WATCHINFOLENGTH and make postonenotification() copy beyond the posting task's stack record.
Give infoid storage separate from rcuhead so RCU enqueueing cannot modify it. Place it after the kref, which uses existing tail padding on x86-64. Mask infoid with WATCHINFOID at the point of use as an additional invariant check.
An unprivileged shell and keyctl reproducer was run for 30 seconds in QEMU. The vulnerable baseline produced malformed notification lengths, while this change completed with 288631 key notifications and no malformed record.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In watch_queue, store info_id separately from rcu_head, place it after the kref (using existing tail padding on x86-64), and mask info_id with WATCH_INFO_ID at the point of use.
Event History
Frequently Asked Questions
What access does an attacker need to trigger this issue?
The provided reproducer uses an unprivileged shell and keyctl, indicating that local unprivileged users can trigger the vulnerable watch_queue notification path.
What is the potential impact of successful exploitation?
Corruption of info_id can produce a malformed WATCH_INFO_LENGTH value. This can cause post_one_notification() to copy beyond the posting task's stack record.
How can I tell whether a system may be affected?
In the reported reproducer, vulnerable systems produced malformed notification lengths during 30 seconds of testing in QEMU. Systems containing one of the referenced stable fixes separate info_id from rcu_head and additionally mask info_id at use.