KASAN: slab-out-of-bounds Read in nfsd

Status: upstream: reported C repro on 2026/10/17 20:28
Subsystems: nfs
Labels: prio:high
[Documentation on labels]
Reported-by: syzbot+561b859d032c8bf2fb53@syzkaller.appspotmail.com
Fix commit: nfsd: store net in svc_serv instead of deriving it from sv_permsocks
Patched on: [ci-upstream-linux-next-kasan-gce-root ci-upstream-rust-kasan-gce], missing on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kasan-gce-kvm-amd ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 127d, last: 4d23h
Cause bisection: failed (error log, bisect log)
▶ ▼ ✨ AI Jobs (2)
ID Workflow Result Correct Bug Created Started Finished Revision
df8df889 repro-c Reproduced: ✅ ❓ KASAN: slab-out-of-bounds Read in nfsd 2026/10/17 14:10 2026/10/17 14:10 2026/10/17 15:46 432c0077
440d092b assessment-security DenialOfService: ✅ Exploitable: ✅ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ✅ VMGuestTrigger: ❌ VMHostTrigger: ❌ ❓ KASAN: slab-out-of-bounds Read in nfsd 2026/07/29 02:21 2026/07/29 02:21 2026/07/29 03:13 7be3c40b
▶ ▼ Discussions (5)
Title Replies (including bot) Last reply
[syzbot] Monthly nfs report (Nov 2026) 0 (1) 2026/11/30 04:33
[PATCH v3] nfsd: store net in svc_serv instead of deriving it from sv_permsocks 3 (3) 2026/10/21 20:30
Re: [PATCH v3] nfsd: store net in svc_serv instead of deriving it from sv_permsocks 1 (1) 2026/10/21 12:46
[syzbot] [nfs?] KASAN: slab-out-of-bounds Read in nfsd 0 (3) 2026/10/20 08:15
[PATCH] nfsd: fix out-of-bounds read of sv_permsocks when starting a thread 4 (4) 2026/10/19 00:40
▶ ▼ Last patch testing requests (4)
Created Duration User Patch Repo Result
2026/11/18 23:15 3h56m retest repro upstream no crash job log log
2026/10/20 08:15 1h59m kartikey406@gmail.com patch upstream OK job log log
2026/10/18 10:42 30m kartikey406@gmail.com patch upstream OK job log log
2026/10/17 20:01 25m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 58161ead29e50d70a317ea26b472e0c7508e69da report job log log
▶ ▼ Cause bisection attempts (2)
Created Duration User Patch Repo Result
2026/11/11 04:50 8m bisect git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git error job log
2026/10/19 22:28 0m bisect git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git error

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in nfsd+0xb77/0xc20 fs/nfsd/nfssvc.c:926
Read of size 8 at addr ffff888054e92ad8 by task nfsd/6282

CPU: 1 UID: 0 PID: 6282 Comm: nfsd Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/15/2026
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0x13d/0x4b0 mm/kasan/report.c:482
 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595
 nfsd+0xb77/0xc20 fs/nfsd/nfssvc.c:926
 kthread+0x373/0x450 kernel/kthread.c:436
 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Allocated by task 6263:
 kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
 kasan_save_track+0x14/0x30 mm/kasan/common.c:78
 poison_kmalloc_redzone mm/kasan/common.c:409 [inline]
 __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:426
 kasan_kmalloc include/linux/kasan.h:263 [inline]
 __kmalloc_cache_noprof+0x2f8/0x6d0 mm/slub.c:5680
 _kmalloc_noprof include/linux/slab.h:991 [inline]
 _kzalloc_noprof include/linux/slab.h:1312 [inline]
 __svc_create+0x5c/0xad0 net/sunrpc/svc.c:402
 svc_create_pooled+0x2bb/0x3a0 net/sunrpc/svc.c:503
 nfsd_create_serv+0x2c1/0x4e0 fs/nfsd/nfssvc.c:632
 __write_ports_addxprt fs/nfsd/nfsctl.c:790 [inline]
 __write_ports fs/nfsd/nfsctl.c:829 [inline]
 write_ports+0x2f1/0xd60 fs/nfsd/nfsctl.c:882
 nfsctl_transaction_write+0x106/0x1a0 fs/nfsd/nfsctl.c:117
 vfs_write+0x2aa/0x1050 fs/read_write.c:685
 ksys_write+0x12a/0x250 fs/read_write.c:739
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff888054e92800
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 384 bytes to the right of
 allocated 344-byte region [ffff888054e92800, ffff888054e92958)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x54e90
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88813ff09c80 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88813ff09c80 dead000000000100 dead000000000122
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffffffffffff01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5641, tgid 5641 (syz-executor), ts 111865342864
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1856
 prep_new_page mm/page_alloc.c:1864 [inline]
 get_page_from_freelist+0x1113/0x35e0 mm/page_alloc.c:3935
 __alloc_frozen_pages_noprof+0x2bd/0x3280 mm/page_alloc.c:5444
 alloc_slab_page mm/slub.c:3384 [inline]
 allocate_slab mm/slub.c:3499 [inline]
 new_slab+0xb1/0x6d0 mm/slub.c:3550
 refill_objects+0xe3/0x410 mm/slub.c:7539
 refill_sheaf mm/slub.c:2917 [inline]
 __pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4811
 alloc_from_pcs mm/slub.c:4887 [inline]
 slab_alloc_node mm/slub.c:5021 [inline]
 __do_kmalloc_node mm/slub.c:5530 [inline]
 __kmalloc_flags_noprof+0x6a4/0x8e0 mm/slub.c:5719
 _kmalloc_flags_noprof mm/slab.h:55 [inline]
 alloc_slab_obj_exts+0x6a/0x170 mm/slub.c:2218
 __memcg_slab_post_alloc_hook+0x3f3/0x10b0 mm/memcontrol.c:3710
 memcg_slab_post_alloc_hook mm/slub.c:2549 [inline]
 slab_post_alloc_hook mm/slub.c:4739 [inline]
 slab_alloc_node mm/slub.c:5033 [inline]
 kmem_cache_alloc_noprof+0x4f5/0x6a0 mm/slub.c:5047
 anon_vma_chain_alloc mm/rmap.c:142 [inline]
 anon_vma_fork+0x212/0xbd0 mm/rmap.c:396
 dup_mmap+0x10e6/0x23e0 mm/mmap.c:1781
 dup_mm kernel/fork.c:1542 [inline]
 copy_mm kernel/fork.c:1594 [inline]
 copy_process+0x7a5e/0x8510 kernel/fork.c:2320
 kernel_clone+0x176/0x9d0 kernel/fork.c:2790
 __do_sys_clone+0xd9/0x120 kernel/fork.c:2932
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84
page last free pid 5643 tgid 5643 ts 111763899808 stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 __free_pages_prepare mm/page_alloc.c:1403 [inline]
 __free_frozen_pages+0x7b4/0x1110 mm/page_alloc.c:2954
 qlink_free mm/kasan/quarantine.c:163 [inline]
 qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179
 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286
 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:361
 kasan_slab_alloc include/linux/kasan.h:253 [inline]
 slab_post_alloc_hook mm/slub.c:4720 [inline]
 slab_alloc_node mm/slub.c:5033 [inline]
 __kmalloc_cache_noprof+0x278/0x6d0 mm/slub.c:5676
 _kmalloc_noprof include/linux/slab.h:991 [inline]
 _kzalloc_noprof include/linux/slab.h:1312 [inline]
 percpu_ref_init+0xec/0x3f0 lib/percpu-refcount.c:76
 css_create kernel/cgroup/cgroup.c:5964 [inline]
 cgroup_apply_control_enable+0x65d/0xdd0 kernel/cgroup/cgroup.c:3474
 cgroup_mkdir+0x9da/0x13a0 kernel/cgroup/cgroup.c:6186
 kernfs_iop_mkdir+0x111/0x190 fs/kernfs/dir.c:1304
 vfs_mkdir+0x36d/0x8a0 fs/namei.c:5428
 filename_mkdirat+0x4c4/0x630 fs/namei.c:5461
 __do_sys_mkdirat fs/namei.c:5482 [inline]
 __se_sys_mkdirat fs/namei.c:5479 [inline]
 __x64_sys_mkdirat+0x89/0xc0 fs/namei.c:5479
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff888054e92980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888054e92a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888054e92a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                    ^
 ffff888054e92b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888054e92b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
Oops: general protection fault, probably for non-canonical address 0xdffffc00000002d9: 0000 [#1] SMP KASAN NOPTI
KASAN: probably user-memory-access in range [0x00000000000016c8-0x00000000000016cf]
CPU: 1 UID: 0 PID: 6282 Comm: nfsd Tainted: G    B               syzkaller #0 PREEMPT(full) 
Tainted: [B]=BAD_PAGE
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/15/2026
RIP: 0010:net_generic+0x6e/0x2a0 include/net/netns/generic.h:46
Code: b3 d0 fe 58 45 85 e4 0f 85 af 00 00 00 e8 4a b9 d0 fe 48 8d bd c8 16 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 1a 02 00 00 4c 8b a5 c8 16 00 00 e8 ec 55 af 08
RSP: 0018:ffffc9000ce77d60 EFLAGS: 00010212
RAX: dffffc0000000000 RBX: 000000000000000e RCX: 0000000000000000
RDX: 00000000000002d9 RSI: ffffffff833d7bb6 RDI: 00000000000016c8
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff95beeb27 R11: 0000000000000000 R12: 0000000000000000
R13: 00000000fffffffc R14: ffffffff81d4e26a R15: 1ffff920019cefb9
FS:  0000000000000000(0000) GS:ffff88812257a000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5b0a07fc00 CR3: 0000000054ffa000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 nfsd+0x152/0xc20 fs/nfsd/nfssvc.c:927
 kthread+0x373/0x450 kernel/kthread.c:436
 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:net_generic+0x6e/0x2a0 include/net/netns/generic.h:46
Code: b3 d0 fe 58 45 85 e4 0f 85 af 00 00 00 e8 4a b9 d0 fe 48 8d bd c8 16 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 1a 02 00 00 4c 8b a5 c8 16 00 00 e8 ec 55 af 08
RSP: 0018:ffffc9000ce77d60 EFLAGS: 00010212
RAX: dffffc0000000000 RBX: 000000000000000e RCX: 0000000000000000
RDX: 00000000000002d9 RSI: ffffffff833d7bb6 RDI: 00000000000016c8
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff95beeb27 R11: 0000000000000000 R12: 0000000000000000
R13: 00000000fffffffc R14: ffffffff81d4e26a R15: 1ffff920019cefb9
FS:  0000000000000000(0000) GS:ffff88812257a000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6377621000 CR3: 00000000361c3000 CR4: 0000000000350ef0
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	d0 fe                	sar    $1,%dh
   2:	58                   	pop    %rax
   3:	45 85 e4             	test   %r12d,%r12d
   6:	0f 85 af 00 00 00    	jne    0xbb
   c:	e8 4a b9 d0 fe       	call   0xfed0b95b
  11:	48 8d bd c8 16 00 00 	lea    0x16c8(%rbp),%rdi
  18:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  1f:	fc ff df
  22:	48 89 fa             	mov    %rdi,%rdx
  25:	48 c1 ea 03          	shr    $0x3,%rdx
* 29:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2d:	0f 85 1a 02 00 00    	jne    0x24d
  33:	4c 8b a5 c8 16 00 00 	mov    0x16c8(%rbp),%r12
  3a:	e8 ec 55 af 08       	call   0x8af562b

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/01 08:22 upstream cbbddb6b08cc 25a0ae84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root KASAN: slab-out-of-bounds Read in nfsd
2026/10/17 20:27 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 58161ead29e5 4cb2b096 .config console log report C ci-upstream-kasan-gce-smack-root KASAN: slab-out-of-bounds Read in nfsd
2026/07/28 00:08 upstream f5098b6bae76 4cb2b096 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-out-of-bounds Read in nfsd
2026/11/27 04:47 upstream 9437ee8b6cf6 f1f6b8bf .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 KASAN: slab-out-of-bounds Read in nfsd
2026/11/22 12:40 upstream f802b6558eb8 b2c69459 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 KASAN: slab-out-of-bounds Read in nfsd
2026/11/22 12:38 upstream f802b6558eb8 b2c69459 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 KASAN: slab-out-of-bounds Read in nfsd
2026/10/16 09:53 linux-next b810335a0699 3f2522c6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-out-of-bounds Read in nfsd
2026/08/17 22:22 linux-next 4477a78374a5 1e72964b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-out-of-bounds Read in nfsd
* Struck through repros no longer work on HEAD.