uvm_fault: in_ifdetach

Status: upstream: reported on 2026/09/21 02:58
Reported-by: syzbot+a6f499fcf5568bede02a@syzkaller.appspotmail.com
First crash: 21d, last: 21d

Sample crash report:
uvm_fault(0xfffff9007f227b80, 0x1, 0, 1) -> e
kernel: page fault trap, code=0
Stopped at      in_ifdetach+0x67:       movzbl  0x1(%rax),%r12d
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
in_ifdetach(ffff8000015f1000) at in_ifdetach+0x67 sys/netinet/in.c:1018
if_detach(ffff8000015f1000) at if_detach+0x322 sys/net/if.c:1311
tun_clone_destroy(ffff8000015f1000) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343
if_clone_destroy(ffff80002a7f6dc0) at if_clone_destroy+0x1d5 sys/net/if.c:1480
tun_dev_close(5d01,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526
spec_close(ffff80002a7f6e80) at spec_close+0x417 sys/kern/spec_vnops.c:-1
VOP_CLOSE(fffff9006fac9538,7,fffff90007ffd750,ffff80002a761238) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156
vn_closefile(fffff9000dffeda8,ffff80002a761238) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline]
vn_closefile(fffff9000dffeda8,ffff80002a761238) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621
fdrop(fffff9000dffeda8,ffff80002a761238) at fdrop+0x121 sys/kern/kern_descrip.c:1281
closef(fffff9000dffeda8,ffff80002a761238) at closef+0x190 sys/kern/kern_descrip.c:1265
fdfree(ffff80002a761238) at fdfree+0x115 sys/kern/kern_descrip.c:1196
exit1(ffff80002a761238,43,0,1) at exit1+0x595 sys/kern/kern_exit.c:215
sys_exit(ffff80002a761238,ffff80002a7f71e0,ffff80002a7f7130) at sys_exit+0x1a sys/kern/kern_exit.c:-1
syscall(ffff80002a7f71e0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline]
syscall(ffff80002a7f71e0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791
end trace frame: 0xffff80002a7f7260, count: 0
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports.  Insufficient info makes it difficult to find and fix bugs.
ddb> 
ddb> set $lines = 0
ddb> set $maxwidth = 0
ddb> show panic
*cpu0: uvm_fault(0xfffff9007f227b80, 0x1, 0, 1) -> e
ddb> show kasan
No such command
ddb> trace
in_ifdetach(ffff8000015f1000) at in_ifdetach+0x67 sys/netinet/in.c:1018
if_detach(ffff8000015f1000) at if_detach+0x322 sys/net/if.c:1311
tun_clone_destroy(ffff8000015f1000) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343
if_clone_destroy(ffff80002a7f6dc0) at if_clone_destroy+0x1d5 sys/net/if.c:1480
tun_dev_close(5d01,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526
spec_close(ffff80002a7f6e80) at spec_close+0x417 sys/kern/spec_vnops.c:-1
VOP_CLOSE(fffff9006fac9538,7,fffff90007ffd750,ffff80002a761238) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156
vn_closefile(fffff9000dffeda8,ffff80002a761238) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline]
vn_closefile(fffff9000dffeda8,ffff80002a761238) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621
fdrop(fffff9000dffeda8,ffff80002a761238) at fdrop+0x121 sys/kern/kern_descrip.c:1281
closef(fffff9000dffeda8,ffff80002a761238) at closef+0x190 sys/kern/kern_descrip.c:1265
fdfree(ffff80002a761238) at fdfree+0x115 sys/kern/kern_descrip.c:1196
exit1(ffff80002a761238,43,0,1) at exit1+0x595 sys/kern/kern_exit.c:215
sys_exit(ffff80002a761238,ffff80002a7f71e0,ffff80002a7f7130) at sys_exit+0x1a sys/kern/kern_exit.c:-1
syscall(ffff80002a7f71e0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline]
syscall(ffff80002a7f71e0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x79789d9865b0, count: -15
ddb> show registers
rdi                                0
rsi                                0
rbp               0xffff80002a7f6cb0
rbx               0xffff8000015ec6c0
rdx                                0
rcx               0x9864c57ba3340b55
rax                                0
r8                0xffffffffffffffff
r9                                 0
r10               0xae909d43df61a4ce
r11               0xdf757b9c1aa3e318
r12                              0x8
r13               0xffff8000015f1048
r14               0xffff8000015f1000
r15               0xffffffff83aec5c0    speclisth+0x1c0
rip               0xffffffff818dc6b7    in_ifdetach+0x67
cs                               0x8
rflags                       0x10286    __ALIGN_SIZE+0xf286
rsp               0xffff80002a7f6c60
ss                              0x10
in_ifdetach+0x67:       movzbl  0x1(%rax),%r12d
ddb> show proc
PROC (syz-executor) tid=293042 pid=15521 tcnt=0 stat=onproc
    flags process=a<EXEC,EXITING> proc=2000<WEXIT>
    runpri=32, usrpri=79, slppri=32, nice=20
    wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=1
    forw=0xffffffffffffffff, list=0xffff80002a7607d8,0xffff80002a761ca8
    process=0xffff80002a78c010 user=0xffff80002a7f2000, vmspace=0xfffff9007f227b80
    estcpu=29, cpticks=4, pctcpu=0.0, user=0, sys=1, intr=0
ddb> ps
   PID     TID   PPID   UID  S      PRLAGS     PFLAGS WAIT      COMMAND
 80431  297134  59914     0  3         0x2          0 clonelk   ifconfig
 59914  183725  47826     0  3    0x100002       0x88 sigsusp   sh
 47826   97722  81795     0  3         0x2       0x80 wait      syz-executor
   433   26449  92143     0  3         0x2          0 clonelk   ifconfig
 92143  479975   6953     0  3    0x100002       0x88 sigsusp   sh
  6953  399014  81795     0  3         0x2       0x80 wait      syz-executor
 36036  427022  81795     0  3         0x2       0x80 piperd    syz-executor
 32620  304695  81795     0  3         0x2       0x80 piperd    syz-executor
 83624  164458  81795     0  3         0x2       0x80 piperd    syz-executor
  9991  240185  81795     0  3         0x2       0x80 nanoslp   syz-executor
 31134  476047  81795     0  3         0x2       0x80 nanoslp   syz-executor
 81795  287247  99339     0  3         0x2       0x80 wait      syz-executor
 99339   80853  50743     0  3    0x100002       0x88 sigsusp   ksh
 50743  410060  34119     0  3        0x10       0x88 kqread    sshd-session
 34119  204646  95167     0  3        0x12       0x80 kqread    sshd-session
 29735  230945      1     0  3    0x100003       0x80 ttyin     getty
 95167  307650      1     0  3           0       0x88 kqread    sshd
 81642    2339  25885    73  3   0x1100010       0x80 kqread    syslogd
 25885  427228      1     0  3    0x100002       0x80 sbwait    syslogd
 89418  134153      1     0  3    0x100000       0x80 kqread    resolvd
 10031   95266  80023    77  3    0x100012       0x80 kqread    dhcpleased
 72059  369496  80023    77  3    0x100012       0x80 kqread    dhcpleased
 80023  110430      1     0  3           0       0x80 kqread    dhcpleased
 85913  514069      0     0  3     0x14000      0x200 bored     smr
 25311  126015      0     0  3     0x14000      0x200 pgzero    zerothread
 86000   88022      0     0  3     0x14000      0x200 aiodoned  aiodoned
 39166   46258      0     0  3     0x14000      0x200 syncer    update
 19523  306794      0     0  3     0x14000      0x200 cleaner   cleaner
 95183  217933      0     0  3     0x14000      0x200 reaper    reaper
 14157  313715      0     0  3     0x14000      0x200 pgdaemon  pagedaemon
 36591  413419      0     0  3     0x14000      0x200 bored     viomb
 83951  174228      0     0  3     0x14000 0x40000200 acpi0     acpi0
 35879  213557      0     0  3     0x14000      0x200 bored     softnet0
 61077  404340      0     0  3     0x14000      0x200 smrbar    systqmp
 60949  157627      0     0  3     0x14000      0x200 bored     systq
 80418   78718      0     0  3     0x14000 0x40000200 tmoslp    softclock
 10761  306538      0     0  3     0x14000 0x40000200           idle0
     1  126751      0     0  3         0x2       0x80 wait      init
     0       0     -1     0  3     0x10000      0x200 scheduler swapper
ddb> show all locks
No such command
ddb> show malloc
           Type InUse  MemUse  HighUse   Limit  Requests Type Lim
         devbuf 11029  12103K   12315K 166960K     12202        0
            pcb    17     14K      16K 166960K        36        0
         rtable   198      5K      10K 166960K       377        0
             pf    30     13K      19K 166960K        69        0
         ifaddr    36      6K       7K 166960K        48        0
        ifgroup    44      1K       2K 166960K        56        0
         sysctl     3      1K       9K 166960K         7        0
       counters    32     17K      18K 166960K        36        0
       ioctlops     0      0K       4K 166960K        51        0
            iov     0      0K      12K 166960K         3        0
          mount     1      1K       1K 166960K         1        0
            log     0      0K       0K 166960K         4        0
         vnodes  1298     82K      82K 166960K      1457        0
      UFS quota     1     32K      32K 166960K         1        0
      UFS mount     5     36K      36K 166960K         5        0
            shm     2      1K       1K 166960K         2        0
         VM map     2      1K       1K 166960K         2        0
            sem    13      0K       1K 166960K        18        0
        dirhash    12      2K       2K 166960K        12        0
           ACPI  1692    195K     286K 166960K     12470        0
      file desc    16     57K      93K 166960K       226        0
          sigio     0      0K       0K 166960K         3        0
           proc    74     75K     108K 166960K       512        0
        subproc    72      4K       4K 166960K        90        0
    NFS srvsock     1      0K       0K 166960K         1        0
     NFS daemon     1     16K      16K 166960K         1        0
    ip_moptions     0      0K       0K 166960K        17        0
       in_multi    81      5K       6K 166960K       110        0
    ether_multi     1      0K       0K 166960K         1        0
            mrt     0      0K       0K 166960K         7        0
    ISOFS mount     1     32K      32K 166960K         1        0
  MSDOSFS mount     1     16K      16K 166960K         1        0
           ttys    73    334K     334K 166960K        73        0
           exec     0      0K       1K 166960K       380        0
   fusefs mount     1     32K      32K 166960K         1        0
            tdb     3      0K       0K 166960K         3        0
        VM swap     8     62K      64K 166960K        10        0
       UVM amap   190    152K     160K 166960K      3670        0
       UVM aobj     4      2K       2K 166960K         4        0
     pinsyscall    37     74K      94K 166960K      1334        0
        memdesc     1      4K       4K 166960K         1        0
    crypto data     1      1K       1K 166960K         1        0
            NDP    10      0K       2K 166960K        30        0
           temp    38   9106K    9126K 166960K      3665        0
         kqueue    14     20K      27K 166960K        47        0
      SYN cache     2     16K      16K 166960K         2        0
ddb> show all pools
Name      Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
rtpcb      120       37    0       34     1     0     1     1     0     8    0
rtentry    136      113    0       23     4     0     4     4     0     8    0
unpcb      144      417    0      400     6     5     1     6     0     8    0
syncache   336        8    0        8     2     1     1     1     0     8    1
tcpqe       32        2    0        2     1     0     1     1     0     8    1
tcpcb      736      231    0      161    12     5     7    12     0     8    0
arp         96       18    0        4     1     0     1     1     0     8    0
ipq         40        1    0        0     1     0     1     1     0     8    0
ipqe        40        2    0        1     1     0     1     1     0     8    0
inpcb      328      322    0      247    12     5     7    12     0     8    0
nd6        112       25    0        6     1     0     1     1     0     8    0
kcovpl      48       10    0        2     1     0     1     1     0     8    0
ppxss      1072       3    0        2     1     0     1     1     0     8    0
pfstscr     40        4    0        2     1     0     1     1     0     8    0
pfrktable  1344       9    0        9     1     0     1     1     0     8    1
pfanchor   1288       5    0        2     1     0     1     1     0     8    0
pftag       88        2    0        2     1     0     1     1     0     8    1
pfqueue    320        1    0        1     1     0     1     1     0     8    1
pfstitem    24        2    0        0     1     0     1     1     0     8    0
pfstkey    128        4    0        2     1     0     1     1     0     8    0
pfstate    384        2    0        1     1     0     1     1     0     8    0
pfrule     1360       2    0        2     2     1     1     1     0     8    1
art_heap8  4096       1    0        0     1     0     1     1     0     8    0
art_heap4  256      453    0       88    29     0    29    29     0     8    2
art_table   40      454    0       88     5     0     5     5     0     8    0
art_node    32      113    0       31     1     0     1     1     0     8    0
sysvmsgpl   40        1    0        1     1     0     1     1     0     8    1
semapl      72       15    0        4     1     0     1     1     0     8    0
shmpl      120        1    0        0     1     0     1     1     0     8    0
dirhash    1024      17    0        0     3     0     3     3     0     8    0
dino2pl    256     1738    0      274    92     0    92    92     0     8    0
ffsino     256     1738    0      274    92     0    92    92     0     8    0
nchpl      144     2056    0      359    64     0    64    64     0     8    0
vnodes     216     1880    0        0   105     0   105   105     0     8    0
namei      1024    7017    0     7017     4     3     1     4     0     8    1
pfiaddrpl  120        3    0        3     1     0     1     1     0     8    1
kstatmem   264       29    0        8     2     0     2     2     0     8    0
scsiplug    72        3    0        3     1     0     1     1     0     8    1
scxspl     216     7236    0     7236     8     7     1     8     1     8    1
plimitpl   152      107    0       90     1     0     1     1     0     8    0
sigapl     424      517    0      476     6     1     5     6     0     8    0
knotepl    120     4890    0     4843     9     7     2     9     0     8    0
kqueuepl   184       50    0       40     1     0     1     1     0     8    0
pipepl     304      131    0      104     3     0     3     3     0     8    0
fdescpl    448      504    0      476     5     1     4     5     0     8    0
filepl     120     2486    0     2214    16     6    10    15     0     8    0
lockfpl    104       37    0       35     1     0     1     1     0     8    0
lockfspl    48       18    0       16     1     0     1     1     0     8    0
sessionpl  144       33    0       25     1     0     1     1     0     8    0
pgrppl      48       46    0       30     1     0     1     1     0     8    0
ucredpl    104      191    0      180     1     0     1     1     0     8    0
zombiepl   144      479    0      476     1     0     1     1     0     8    0
processpl  1160     517    0      476     4     0     4     4     0     8    0
procpl     664      647    0      606     5     0     5     5     0     8    0
sosppl     176        2    0        2     1     1     0     1     0     8    0
sockpl     552      780    0      685    22    14     8    21     0     8    0
mcl64k     65536      4    0        4     1     1     0     1     0     8    0
mcl16k     16384      1    0        1     1     1     0     1     0     8    0
mcl8k      8192       4    0        4     1     1     0     1     0     8    0
mcl4k      4096    2605    0     2555    14     7     7    14     0     8    0
mcl2k      2048     197    0      197     3     2     1     3     0     8    1
mextrefs    64       85    0       85     1     0     1     1     0     8    1
mtagpl      96        4    0        4     1     1     0     1     0     8    0
mbufpl     256     5117    0     4985    12     0    12    12     0     8    0
bufpl      272     2338    0      104   149     0   149   149     0     8    0
anonpl      24    98652    0    95695    44    23    21    44     0   187    1
amapchunkpl 152   10545    0    10181    30     8    22    29     0   158    2
amappl16   200     1604    0     1586     5     3     2     5     0     8    0
amappl15   192        9    0        9     1     1     0     1     0     8    0
amappl14   184      414    0      411     1     0     1     1     0     8    0
amappl13   176      118    0      108     1     0     1     1     0     8    0
amappl12   168      745    0      720     2     0     2     2     0     8    0
amappl11   160        3    0        3     1     1     0     1     0     8    0
amappl10   152       86    0       76     1     0     1     1     0     8    0
amappl9    144      291    0      291     1     1     0     1     0     8    0
amappl8    136       95    0       92     1     0     1     1     0     8    0
amappl7    128      146    0      135     1     0     1     1     0     8    0
amappl6    120      161    0      156     1     0     1     1     0     8    0
amappl5    112      115    0      105     1     0     1     1     0     8    0
amappl4    104      264    0      249     1     0     1     1     0     8    0
amappl3     96     1838    0     1768     3     0     3     3     0     8    0
amappl2     88      622    0      553     2     0     2     2     0     8    0
amappl1     80    10401    0     9860    14     2    12    14     0     8    0
amappl      88     2961    0     2834     6     1     5     5     0    92    0
uvmvnodes   80       99    0        0     3     0     3     3     0     8    0
dma4096    4096       1    0        1     1     1     0     1     0     8    0
dma1024    1024       1    0        0     1     0     1     1     0     8    0
dma256     256        6    0        6     1     1     0     1     0     8    0
dma128     128      253    0      253     1     1     0     1     0     8    0
dma64       64        6    0        6     1     1     0     1     0     8    0
dma32       32        7    0        7     1     1     0     1     0     8    0
dma16       16       18    0       17     1     0     1     1     0     8    0
aobjpl      72        3    0        0     1     0     1     1     0     8    0
uaddrrnd    24      504    0      476     1     0     1     1     0     8    0
uaddrbest   32        2    0        0     1     0     1     1     0     8    0
uaddr       24      504    0      476     1     0     1     1     0     8    0
vmmpekpl   168     6044    0     6010     2     0     2     2     0     8    0
vmmpepl    168    41244    0    39668    81     0    81    81     0   357    3
vmsppl     368      503    0      476     4     1     3     4     0     8    0
rwobjpl     40    14786    0    13862    11     0    11    11     0     8    0
pdppl      4096    1014    0      952    98    30    68    80     0     8    6
pvpl        32   246279    0   238378   148    65    83   148     0   265    2
pmappl     216      503    0      476     3     0     3     3     0     8    0
extentpl    40       45    0       27     1     0     1     1     0     8    0
phpool     112      528    0       56    15     0    15    15     0     8    0
ddb> machine ddbcpu 0
No such command
ddb> trace
in_ifdetach(ffff8000015f1000) at in_ifdetach+0x67 sys/netinet/in.c:1018
if_detach(ffff8000015f1000) at if_detach+0x322 sys/net/if.c:1311
tun_clone_destroy(ffff8000015f1000) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343
if_clone_destroy(ffff80002a7f6dc0) at if_clone_destroy+0x1d5 sys/net/if.c:1480
tun_dev_close(5d01,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526
spec_close(ffff80002a7f6e80) at spec_close+0x417 sys/kern/spec_vnops.c:-1
VOP_CLOSE(fffff9006fac9538,7,fffff90007ffd750,ffff80002a761238) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156
vn_closefile(fffff9000dffeda8,ffff80002a761238) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline]
vn_closefile(fffff9000dffeda8,ffff80002a761238) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621
fdrop(fffff9000dffeda8,ffff80002a761238) at fdrop+0x121 sys/kern/kern_descrip.c:1281
closef(fffff9000dffeda8,ffff80002a761238) at closef+0x190 sys/kern/kern_descrip.c:1265
fdfree(ffff80002a761238) at fdfree+0x115 sys/kern/kern_descrip.c:1196
exit1(ffff80002a761238,43,0,1) at exit1+0x595 sys/kern/kern_exit.c:215
sys_exit(ffff80002a761238,ffff80002a7f71e0,ffff80002a7f7130) at sys_exit+0x1a sys/kern/kern_exit.c:-1
syscall(ffff80002a7f71e0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline]
syscall(ffff80002a7f71e0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x79789d9865b0, count: -15
ddb> machine ddbcpu 1
No such command
ddb> trace
in_ifdetach(ffff8000015f1000) at in_ifdetach+0x67 sys/netinet/in.c:1018
if_detach(ffff8000015f1000) at if_detach+0x322 sys/net/if.c:1311
tun_clone_destroy(ffff8000015f1000) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343
if_clone_destroy(ffff80002a7f6dc0) at if_clone_destroy+0x1d5 sys/net/if.c:1480
tun_dev_close(5d01,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526
spec_close(ffff80002a7f6e80) at spec_close+0x417 sys/kern/spec_vnops.c:-1
VOP_CLOSE(fffff9006fac9538,7,fffff90007ffd750,ffff80002a761238) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156
vn_closefile(fffff9000dffeda8,ffff80002a761238) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline]
vn_closefile(fffff9000dffeda8,ffff80002a761238) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621
fdrop(fffff9000dffeda8,ffff80002a761238) at fdrop+0x121 sys/kern/kern_descrip.c:1281
closef(fffff9000dffeda8,ffff80002a761238) at closef+0x190 sys/kern/kern_descrip.c:1265
fdfree(ffff80002a761238) at fdfree+0x115 sys/kern/kern_descrip.c:1196
exit1(ffff80002a761238,43,0,1) at exit1+0x595 sys/kern/kern_exit.c:215
sys_exit(ffff80002a761238,ffff80002a7f71e0,ffff80002a7f7130) at sys_exit+0x1a sys/kern/kern_exit.c:-1
syscall(ffff80002a7f71e0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline]
syscall(ffff80002a7f71e0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x79789d9865b0, count: -15

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/21 02:57 openbsd d42776463e37 853b104b .config console log report [disk image] [bsd.gdb] [kernel image] ci-openbsd-main uvm_fault: in_ifdetach
* Struck through repros no longer work on HEAD.