In the Linux kernel, the following vulnerability has been resolved:
nfs: Clean up /proc/net/rpc/nfs when nfsfsprocnetinit() fails.
syzbot reported a warning below [1] following a fault injection in nfsfsprocnetinit(). [0]
When nfsfsprocnetinit() fails, /proc/net/rpc/nfs is not removed.
Later, rpcprocexit() tries to remove /proc/net/rpc, and the warning is logged as the directory is not empty.
Let's handle the error of nfsfsprocnetinit() properly.
name failslab, interval 1, probability 0, space 0, times 0 CPU: 1 UID: 0 PID: 6120 Comm: syz.2.27 Not tainted 6.16.0-rc1-syzkaller-00010-g2c4a1f3fe03e #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: <TASK> dumpstacklvl (lib/dumpstack.c:123) shouldfailex (lib/fault-inject.c:73 lib/fault-inject.c:174) shouldfailslab (mm/failslab.c:46) kmemcacheallocnoprof (mm/slub.c:4178 mm/slub.c:4204) _proccreate (fs/proc/generic.c:427) proccreatereg (fs/proc/generic.c:554) proccreatenetdata (fs/proc/procnet.c:120) nfsfsprocnetinit (fs/nfs/client.c:1409) nfsnetinit (fs/nfs/inode.c:2600) opsinit (net/core/netnamespace.c:138) setupnet (net/core/netnamespace.c:443) copynetns (net/core/netnamespace.c:576) createnewnamespaces (kernel/nsproxy.c:110) unsharensproxynamespaces (kernel/nsproxy.c:218 (discriminator 4)) ksysunshare (kernel/fork.c:3123) _x64sysunshare (kernel/fork.c:3190) dosyscall64 (arch/x86/entry/syscall64.c:63 arch/x86/entry/syscall64.c:94) entrySYSCALL64afterhwframe (arch/x86/entry/entry_64.S:130) </TASK>
WARNING: CPU: 1 PID: 6120 at fs/proc/generic.c:727 removeprocentry+0x45e/0x530 fs/proc/generic.c:727 Modules linked in: CPU: 1 UID: 0 PID: 6120 Comm: syz.2.27 Not tainted 6.16.0-rc1-syzkaller-00010-g2c4a1f3fe03e #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 RIP: 0010:removeprocentry+0x45e/0x530 fs/proc/generic.c:727 Code: 3c 02 00 0f 85 85 00 00 00 48 8b 93 d8 00 00 00 4d 89 f0 4c 89 e9 48 c7 c6 40 ba a2 8b 48 c7 c7 60 b9 a2 8b e8 33 81 1d ff 90 <0f> 0b 90 90 e9 5f fe ff ff e8 04 69 5e ff 90 48 b8 00 00 00 00 00 RSP: 0018:ffffc90003637b08 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff88805f534140 RCX: ffffffff817a92c8 RDX: ffff88807da99e00 RSI: ffffffff817a92d5 RDI: 0000000000000001 RBP: ffff888033431ac0 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: ffff888033431a00 R13: ffff888033431ae4 R14: ffff888033184724 R15: dffffc0000000000 FS: 0000555580328500(0000) GS:ffff888124a62000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f71733743e0 CR3: 000000007f618000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> sunrpcexitnet+0x46/0x90 net/sunrpc/sunrpcsyms.c:76 opsexitlist net/core/netnamespace.c:200 [inline] opsundolist+0x2eb/0xab0 net/core/netnamespace.c:253 setupnet+0x2e1/0x510 net/core/netnamespace.c:457 copynetns+0x2a6/0x5f0 net/core/netnamespace.c:574 createnewnamespaces+0x3ea/0xa90 kernel/nsproxy.c:110 unsharensproxynamespaces+0xc0/0x1f0 kernel/nsproxy.c:218 ksysunshare+0x45b/0xa40 kernel/fork.c:3121 _dosysunshare kernel/fork.c:3192 [inline] _sesysunshare kernel/fork.c:3190 [inline] _x64sysunshare+0x31/0x40 kernel/fork.c:3190 dosyscallx64 arch/x86/entry/syscall64.c:63 [inline] dosyscall64+0xcd/0x490 arch/x86/entry/syscall64.c:94 entrySYSCALL64afterhwframe+0x77/0x7f RIP: 0033:0x7fa1a6b8e929 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c ---truncated---
[
{
"deprecated": false,
"target": {
"file": "fs/nfs/inode.c",
"function": "nfs_net_init"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@412534a1fb76958b88dca48360c6f3ad4f3390f4",
"digest": {
"function_hash": "252907097923429520515201743046895642445",
"length": 231.0
},
"signature_type": "Function",
"id": "CVE-2025-38400-0116bbd1"
},
{
"deprecated": false,
"target": {
"file": "fs/nfs/inode.c",
"function": "nfs_net_init"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7701c245ff1ac1a126bf431e72b24547519046ff",
"digest": {
"function_hash": "252907097923429520515201743046895642445",
"length": 231.0
},
"signature_type": "Function",
"id": "CVE-2025-38400-0341c31a"
},
{
"deprecated": false,
"target": {
"file": "fs/nfs/inode.c",
"function": "nfs_net_init"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e8d6f3ab59468e230f3253efe5cb63efa35289f7",
"digest": {
"function_hash": "252907097923429520515201743046895642445",
"length": 231.0
},
"signature_type": "Function",
"id": "CVE-2025-38400-083540e1"
},
{
"deprecated": false,
"target": {
"file": "fs/nfs/inode.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e8d6f3ab59468e230f3253efe5cb63efa35289f7",
"digest": {
"threshold": 0.9,
"line_hashes": [
"208147522281952159395681816232420606771",
"242241053954941520115978665040466797488",
"13415367565745435538851531468473127785",
"291275989290191722804309823470396336748",
"230702570383080322469133539504523341307",
"297078377840905890522137167983496529211",
"134272018082285814153769764915546139386",
"325844424044075175276577845453956114151",
"39412890942537044052052770917667622398",
"223356873521915008487950638499731149290"
]
},
"signature_type": "Line",
"id": "CVE-2025-38400-09d08e80"
},
{
"deprecated": false,
"target": {
"file": "fs/nfs/inode.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3c94212b57bedec3a386ef3da1ef00602f5c3d1d",
"digest": {
"threshold": 0.9,
"line_hashes": [
"208147522281952159395681816232420606771",
"242241053954941520115978665040466797488",
"13415367565745435538851531468473127785",
"291275989290191722804309823470396336748",
"230702570383080322469133539504523341307",
"297078377840905890522137167983496529211",
"134272018082285814153769764915546139386",
"325844424044075175276577845453956114151",
"39412890942537044052052770917667622398",
"223356873521915008487950638499731149290"
]
},
"signature_type": "Line",
"id": "CVE-2025-38400-1a8dc952"
},
{
"deprecated": false,
"target": {
"file": "fs/nfs/inode.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d0877c479f44fe475f4c8c02c88ce9ad43e90298",
"digest": {
"threshold": 0.9,
"line_hashes": [
"208147522281952159395681816232420606771",
"242241053954941520115978665040466797488",
"13415367565745435538851531468473127785",
"291275989290191722804309823470396336748",
"230702570383080322469133539504523341307",
"297078377840905890522137167983496529211",
"134272018082285814153769764915546139386",
"325844424044075175276577845453956114151",
"39412890942537044052052770917667622398",
"223356873521915008487950638499731149290"
]
},
"signature_type": "Line",
"id": "CVE-2025-38400-1c507327"
},
{
"deprecated": false,
"target": {
"file": "fs/nfs/inode.c",
"function": "nfs_net_init"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3c94212b57bedec3a386ef3da1ef00602f5c3d1d",
"digest": {
"function_hash": "252907097923429520515201743046895642445",
"length": 231.0
},
"signature_type": "Function",
"id": "CVE-2025-38400-25b10f0a"
},
{
"deprecated": false,
"target": {
"file": "fs/nfs/inode.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7701c245ff1ac1a126bf431e72b24547519046ff",
"digest": {
"threshold": 0.9,
"line_hashes": [
"208147522281952159395681816232420606771",
"242241053954941520115978665040466797488",
"13415367565745435538851531468473127785",
"291275989290191722804309823470396336748",
"230702570383080322469133539504523341307",
"297078377840905890522137167983496529211",
"134272018082285814153769764915546139386",
"325844424044075175276577845453956114151",
"39412890942537044052052770917667622398",
"223356873521915008487950638499731149290"
]
},
"signature_type": "Line",
"id": "CVE-2025-38400-45c1cb8e"
},
{
"deprecated": false,
"target": {
"file": "fs/nfs/inode.c",
"function": "nfs_net_init"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6acf340f8c1d296bcf535986175f5d0d6f2aab09",
"digest": {
"function_hash": "252907097923429520515201743046895642445",
"length": 231.0
},
"signature_type": "Function",
"id": "CVE-2025-38400-4b857c88"
},
{
"deprecated": false,
"target": {
"file": "fs/nfs/inode.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b92397ce96743e4cc090207e2df2a856cb4cef08",
"digest": {
"threshold": 0.9,
"line_hashes": [
"208147522281952159395681816232420606771",
"242241053954941520115978665040466797488",
"13415367565745435538851531468473127785",
"291275989290191722804309823470396336748",
"230702570383080322469133539504523341307",
"297078377840905890522137167983496529211",
"134272018082285814153769764915546139386",
"325844424044075175276577845453956114151",
"39412890942537044052052770917667622398",
"223356873521915008487950638499731149290"
]
},
"signature_type": "Line",
"id": "CVE-2025-38400-4cbbbf61"
},
{
"deprecated": false,
"target": {
"file": "fs/nfs/inode.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6acf340f8c1d296bcf535986175f5d0d6f2aab09",
"digest": {
"threshold": 0.9,
"line_hashes": [
"208147522281952159395681816232420606771",
"242241053954941520115978665040466797488",
"13415367565745435538851531468473127785",
"291275989290191722804309823470396336748",
"230702570383080322469133539504523341307",
"297078377840905890522137167983496529211",
"134272018082285814153769764915546139386",
"325844424044075175276577845453956114151",
"39412890942537044052052770917667622398",
"223356873521915008487950638499731149290"
]
},
"signature_type": "Line",
"id": "CVE-2025-38400-a1757bed"
},
{
"deprecated": false,
"target": {
"file": "fs/nfs/inode.c",
"function": "nfs_net_init"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d0877c479f44fe475f4c8c02c88ce9ad43e90298",
"digest": {
"function_hash": "252907097923429520515201743046895642445",
"length": 231.0
},
"signature_type": "Function",
"id": "CVE-2025-38400-af8fa88f"
},
{
"deprecated": false,
"target": {
"file": "fs/nfs/inode.c",
"function": "nfs_net_init"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b92397ce96743e4cc090207e2df2a856cb4cef08",
"digest": {
"function_hash": "252907097923429520515201743046895642445",
"length": 231.0
},
"signature_type": "Function",
"id": "CVE-2025-38400-f7f1475a"
},
{
"deprecated": false,
"target": {
"file": "fs/nfs/inode.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@412534a1fb76958b88dca48360c6f3ad4f3390f4",
"digest": {
"threshold": 0.9,
"line_hashes": [
"208147522281952159395681816232420606771",
"242241053954941520115978665040466797488",
"13415367565745435538851531468473127785",
"291275989290191722804309823470396336748",
"230702570383080322469133539504523341307",
"297078377840905890522137167983496529211",
"134272018082285814153769764915546139386",
"325844424044075175276577845453956114151",
"39412890942537044052052770917667622398",
"223356873521915008487950638499731149290"
]
},
"signature_type": "Line",
"id": "CVE-2025-38400-fe48070a"
}
]