CVE-2026-74605: eventfs: Use children field for rcu head and add memory barriers
In the Linux kernel, the following vulnerability has been resolved:
eventfs: Use children field for rcu head and add memory barriers
When an eventfs inode is freed, it sets ei->isfreed and then uses its ei->list to add it to the srcu link list as the list field is a union with the rcu list head. As the ei->list is used to iterate over an SRCU protected list without taking the eventfsmutex, there's nothing stopping the iteration over that list to see the ei->rcu instead of the ei->list and it will read a corrupt target.
To fix this, change the union of the rcu list head with the children list. On freeing the eventfs inode, set the isfree and execute a smpwmb() before adding the eventfs inode to the SRCU list.
On iteration of the ei->children list, at the start, execute a smprmb() and then read the isfreed of the ei to see if the children list is still valid. If isfreed is set, then the eichild read is not valid and the loop should exit immediately.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Change the union of the rcu list head with the children list so iteration uses the correct rcu head (ei->rcu / children field) instead of ei->list; specifically: when freeing an eventfs inode, set ei->is_freed and execute smp_wmb(), and when iterating over ei->children list, execute smp_rmb() at the start so the iteration sees ei->is_freed consistently and exits immediately if freed.
Linux kernel eventfs inode SRCU/RCU synchronization eventfs ei->list union usage = Use children field for rcu head and add memory barriers