CVE-2026-143134: netfilter: xt_recent: do not call remove_proc_entry() under recent_lock

Published Dec 3, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

netfilter: xtrecent: do not call removeprocentry() under recentlock

recentprocnetexit() removes the /proc/net/xtrecent/<name> entries of a dying network namespace while holding spinlockbh(&recentlock). removeprocentry() may sleep: procentryrundown() waits until every task that is still inside the entry's file operations has left. A reader of such an entry is counted in by procregread() before recentseqstart() takes recentlock. So if a read is in flight when the namespace is torn down, cleanupnet() sleeps in atomic context holding the spinlock that the reader is spinning on, and neither side can ever make progress.

An unprivileged user can trigger this from a user namespace by adding a rule with the "recent" match and reading its proc file while the namespace is being destroyed. As recentlock is global, every later attempt to take it spins forever too: the spinning can spread to all CPUs, and network namespace teardown stops system-wide.

BUG: sleeping function called from invalid context at kernel/sched/completion.c:116 #3: (recentlock){+...}-{3:3}, at: recentnetexit+0x2b/0x140 Workqueue: netns cleanupnet Call Trace: procentryrundown+0x185/0x1b0 removeprocentry+0x21a/0x520 recentnetexit+0x7f/0x140 cleanupnet+0x414/0x8f0 ... rcu: INFO: rcupreempt self-detected stall on CPU Call Trace: queuedspinlockslowpath+0x313/0xc20 recentseqstart+0x87/0x1b0 seqreaditer+0x265/0x11e0 procregread+0x1ab/0x270

Fix by taking recentmutex instead of recentlock. According to commit a0e889bb1bdc ("[NETFILTER]: recent match: fix "sleeping function called from invalid context""), recentmutex is the lock to use here: it protects recentnet->tables and was introduced so that proc entries are created and removed without recentlock held, because those calls may sleep. hashlimitprocnetexit() does the same for xthashlimit.

Affected Software

1 affected component
Linux Linux kernel

Event History

Dec 3, 2026
CVE Published
via MITRE·09:19 AM
Data Sourced
via MITRE·09:19 AM
Description

Frequently Asked Questions

1

Can an unprivileged local user trigger this issue?

Yes. An unprivileged user can trigger it from a user namespace by adding a netfilter rule using the "recent" match, reading its associated proc file, and causing the network namespace to be destroyed while that read is in flight.

2

What is the practical impact if the race is triggered?

Network namespace teardown can deadlock because cleanup waits while holding a spinlock needed by the active proc-file reader. Because recent_lock is global, subsequent attempts to acquire it can spin indefinitely across CPUs, potentially stopping network namespace teardown system-wide.

3

What evidence may indicate that this condition has occurred?

The kernel may report a "sleeping function called from invalid context" BUG involving recent_lock during recent_net_exit. Systems may also exhibit hung network-namespace cleanup and widespread CPU spinning on later attempts to acquire recent_lock.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203