CVE-2026-99528: SUNRPC: fix netns use-after-free in write_gssp()

Published Nov 19, 2026
·
Updated

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

SUNRPC: fix netns use-after-free in writegssp()

While fuzzing with a customized syzkaller, I hit a refcount warning in xprtalloc(), reached from a write to /proc/net/rpc/use-gss-proxy:

refcountt: addition on 0; use-after-free. WARNING: lib/refcount.c:25 at refcountwarnsaturate+0xf8/0x120 CPU: 0 PID: 10404 Comm: syz.0.17 Not tainted 7.3.0-rc1-00096-gcfebfd3db73d Call Trace: <TASK> xprtalloc+0x83f/0x9d0 xssetupxprt+0xaf/0x3c0 xssetuplocal+0x47/0x7f0 xprtcreatetransport+0x16c/0x730 rpccreate+0x38e/0x7f0 gssprpccreate+0xe2/0x180 setgsspclnt+0xba/0x1b0 writegssp+0x200/0x310 procregwrite+0x240/0x330 vfswrite+0x2aa/0x1050 ksyswrite+0x12a/0x250 dosyscall64+0x117/0x750 entrySYSCALL64afterhwframe+0x77/0x7f </TASK>

createusegssproxyprocentry() stores the struct net pointer as the proc entry's private data without taking a reference on it, and an open file descriptor does not pin the namespace either, as procfs only pins the procdirentry. writegssp() reads that pointer back with pdedata() and hands it to setgsspclnt(), which reaches xprtinit():

xprt->xprtnet = getnettrack(net, &xprt->nstracker, GFPKERNEL);

getnettrack() -> getnet() -> refcountinc() is unconditional, so rpccreate() assumes its caller holds a reference on args.net. writegssp() does not.

Dropping the last ns.count reference does not make the file go away. putnet() only queues cleanupnet() on a workqueue, and the removeprocentry() that fences off further writes runs from the rpcsecgss pernet .exit method, that is, from inside cleanupnet(). A write landing between those two points increments a refcount that is already zero. cleanupnet() does not re-read ns.count, so the namespace is freed anyway and the rpcxprt -- along with the AFLOCAL socket opened for it -- is left pointing at freed memory. The resurrected count is visible to the rest of that teardown too: with CONFIGIPV6MROUTE the same cleanupnet() worker then trips !mrcanfreetable() in ip6mrfreetable(), which tests checknet() on the namespace it is freeing.

It reduces to opening /proc/net/rpc/use-gss-proxy inside a new network namespace, calling setns() back to the original one to drop the last reference, and then writing "1" to the still-open descriptor.

Take the reference in writegssp() itself and refuse the write when the namespace is already gone. This is what procfs does for every other /proc/net file: getprocnet() is maybegetnet(PDENET(PDE(inode))) and seqopennet() returns -ENXIO when it fails. PDENET() cannot be reused here because the parent directory /proc/net/rpc carries no namespace pointer. Adding a .preexit to rpcsecgssnetops so the entry is removed earlier would only narrow the window, since preexit also runs from cleanupnet().

Live namespaces are unaffected: a write still returns the error from setgsspclnt(), a write of "2" still returns -EINVAL, and reads are untouched.

Affected Software

3 affected componentsFixes available
linux/kernel>=3.10.0<6.12.117
6.12.117
linux/kernel>=6.13.0<6.18.61
6.18.61
linux/kernel>=6.19.0<7.3.2
7.3.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.117
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.61
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.2
  4. Compensating control

    In write_gssp(), take a reference on the network namespace and refuse the write if the namespace is already gone.

Event History

Nov 19, 2026
CVE Published
via MITRE·02:44 PM
Data Sourced
via MITRE·02:44 PM
Description
Data Sourced
via OSV·02:44 PM
DescriptionAffected Software
Data Sourced
via NVD·03:18 PM
Description

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