syzbot


uvm_fault: pool_do_put (2)

Status: fixed on 2020/08/05 06:16
Reported-by: syzbot+731ab8c9a0342ace4189@syzkaller.appspotmail.com
Fix commit: efa3c3dd644f Validate input given to ioctl(SIOCAIFADDR_IN6) like NetBSD already does. Fixes a bunch of panics reported by syzkaller.
First crash: 1586d, last: 1343d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
openbsd uvm_fault: pool_do_put 1 1603d 1603d 0/3 closed as invalid on 2019/11/07 08:07
openbsd uvm_fault: pool_do_put (3) 1 131d 131d 0/3 auto-obsoleted due to no activity on 2024/02/16 17:41

Sample crash report:
login: uvm_fault(0xfffffd806bc0a110, 0xc9, 0, 1) -> e
kernel: page fault trap, code=0
Stopped at      pool_do_put+0x12e:      movq    0x8(%rbx),%rbx
ddb> 
ddb> set $lines = 0
ddb> set $maxwidth = 0
ddb> show panic
kernel page fault
uvm_fault(0xfffffd806bc0a110, 0xc9, 0, 1) -> e
pool_do_put(ffffffff82583768,fffffd805a1eae00) at pool_do_put+0x12e sys/kern/subr_pool.c:836
end trace frame: 0xffff80001d405ae0, count: 0
ddb> trace
pool_do_put(ffffffff82583768,fffffd805a1eae00) at pool_do_put+0x12e sys/kern/subr_pool.c:836
pool_put(ffffffff82583768,fffffd805a1eae00) at pool_put+0x4b sys/kern/subr_pool.c:794
m_free(fffffd805a1eae00) at m_free+0x119 sys/kern/uipc_mbuf.c:459
rt_ifa_del(ffff8000009c8d00,800100,ffff8000009c8d40,0) at rt_ifa_del+0x402 sys/net/route.c:1196
in6_unlink_ifa(ffff8000009c8d00,ffff8000009f2800) at in6_unlink_ifa+0x571 sys/netinet6/in6.c:943
in6_update_ifa(ffff8000009f2800,ffff80001d406040,0) at in6_update_ifa+0x13f7 sys/netinet6/in6.c:875
in6_ioctl_change_ifaddr(8080691a,ffff80001d406040,ffff8000009f2800) at in6_ioctl_change_ifaddr+0x40c sys/netinet6/in6.c:352
ifioctl(fffffd805daffaf8,8080691a,ffff80001d406040,ffff80001d339758) at ifioctl+0xe60 sys/net/if.c:2289
sys_ioctl(ffff80001d339758,ffff80001d406158,ffff80001d4061a0) at sys_ioctl+0x4a1
syscall(ffff80001d406220) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffeb3c0, count: -11
ddb> show registers
rdi                                0
rsi                             0xc1
rbp               0xffff80001d405a90
rbx                             0xc1
rdx               0xffff80001d4059e0
rcx                           0x1000    __ALIGN_SIZE
rax               0xfffffd805a1eb000
r8                               0x4
r9                                 0
r10               0xc837e6626e86d9e9
r11               0x5877024ec0c0cca2
r12               0xfffffd805a1eae00
r13               0xa4b8b59bd452dfc1
r14               0xffffffff82583768    mbpool
r15               0xfffffd80676ec0f8
rip               0xffffffff817f43ae    pool_do_put+0x12e
cs                               0x8
rflags                       0x10296    __ALIGN_SIZE+0xf296
rsp               0xffff80001d4059e0
ss                              0x10
pool_do_put+0x12e:      movq    0x8(%rbx),%rbx
ddb> show proc
PROC (syz-executor.0) pid=417631 stat=onproc
    flags process=0 proc=0
    pri=50, usrpri=50, nice=20
    forw=0xffffffffffffffff, list=0xffff80001d3394e8,0xffffffff8256bf20
    process=0xffff80001d38ea80 user=0xffff80001d401000, vmspace=0xfffffd806bc0a110
    estcpu=36, cpticks=0, pctcpu=0.0
    user=0, sys=0, intr=0
ddb> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
*78241  417631  36037      0  7           0                syz-executor.0
 36037   66888  72577      0  3        0x82  nanosleep     syz-executor.0
 72577  417365  89346      0  3        0x82  thrsleep      syz-execprog
 72577  443142  89346      0  3   0x4000082  nanosleep     syz-execprog
 72577  454984  89346      0  3   0x4000082  thrsleep      syz-execprog
 72577  383276  89346      0  3   0x4000082  thrsleep      syz-execprog
 72577  318721  89346      0  3   0x4000082  kqread        syz-execprog
 72577  483865  89346      0  3   0x4000082  thrsleep      syz-execprog
 72577  319311  89346      0  3   0x4000082  thrsleep      syz-execprog
 89346  452177  53815      0  3    0x10008a  pause         ksh
 53815  133368  43381      0  3        0x92  select        sshd
  7824   11122      1      0  3    0x100083  ttyin         getty
 43381   27390      1      0  3        0x80  select        sshd
  8465   36286    262     73  3    0x100090  kqread        syslogd
   262   65690      1      0  3    0x100082  netio         syslogd
 46169  163649      1     77  3    0x100090  poll          dhclient
 52366  274753      1      0  3        0x80  poll          dhclient
 19539  361932      0      0  3     0x14200  bored         smr
 19581  450158      0      0  2     0x14200                zerothread
 72367  204263      0      0  3     0x14200  aiodoned      aiodoned
 89360  403730      0      0  3     0x14200  syncer        update
 40304  447537      0      0  3     0x14200  cleaner       cleaner
 11342  229333      0      0  3     0x14200  reaper        reaper
 17211  203689      0      0  3     0x14200  pgdaemon      pagedaemon
  1490   75353      0      0  3     0x14200  bored         crynlk
 57360  106319      0      0  3     0x14200  bored         crypto
 85208   20371      0      0  3  0x40014200  acpi0         acpi0
 26011   42753      0      0  3     0x14200  bored         softnet
 43685   64010      0      0  3     0x14200  bored         systqmp
 28120  212525      0      0  3     0x14200  bored         systq
 48394  100383      0      0  3  0x40014200  bored         softclock
 21706   65390      0      0  3  0x40014200                idle0
     1  354708      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper
ddb> show all locks
No such command
ddb> show malloc
           Type InUse  MemUse  HighUse   Limit  Requests Type Lim
         devbuf  9443   6321K    6321K  78643K     10540        0
            pcb    13      8K       8K  78643K        13        0
         rtable    83      2K       2K  78643K       154        0
         ifaddr    33      9K       9K  78643K        33        0
       counters    20     16K      16K  78643K        20        0
       ioctlops     0      0K       2K  78643K        14        0
          mount     1      1K       1K  78643K         1        0
         vnodes  1182     74K      74K  78643K      1187        0
      UFS quota     1     32K      32K  78643K         1        0
      UFS mount     5     36K      36K  78643K         5        0
            shm     2      1K       1K  78643K         2        0
         VM map     2      0K       0K  78643K         2        0
            sem     2      0K       0K  78643K         2        0
        dirhash    12      2K       2K  78643K        12        0
           ACPI  1794    195K     288K  78643K     12646        0
      file desc     3      8K      12K  78643K        18        0
           proc    47     38K      54K  78643K       318        0
    NFS srvsock     1      0K       0K  78643K         1        0
     NFS daemon     1     16K      16K  78643K         1        0
       in_multi    22      1K       1K  78643K        22        0
    ether_multi     1      0K       0K  78643K         1        0
    ISOFS mount     1     32K      32K  78643K         1        0
  MSDOSFS mount     1     16K      16K  78643K         1        0
           ttys    19     95K      95K  78643K        19        0
           exec     0      0K       1K  78643K       171        0
        pagedep     1      8K       8K  78643K         1        0
       inodedep     1     32K      32K  78643K         1        0
         newblk     1      0K       0K  78643K         1        0
        VM swap     7     26K      26K  78643K         7        0
       UVM amap    69     11K      11K  78643K       841        0
       UVM aobj     2      2K       2K  78643K         2        0
        memdesc     1      4K       4K  78643K         1        0
    crypto data     1      1K       1K  78643K         1        0
            NDP     6      0K       0K  78643K         6        0
           temp    23   3009K    3073K  78643K      1661        0
         kqueue     3      4K       4K  78643K         3        0
      SYN cache     2     16K      16K  78643K         2        0
ddb> show all pools
Name      Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
arp         64        4    0        0     1     0     1     1     0     8    0
rtpcb       80       17    0       15     1     0     1     1     0     8    0
rtentry    112       34    0        1     1     0     1     1     0     8    0
unpcb      120       27    0       19     1     0     1     1     0     8    0
syncache   264        5    0        5     1     0     1     1     0     8    1
tcpcb      544        8    0        5     1     0     1     1     0     8    0
inpcb      280       27    0       20     1     0     1     1     0     8    0
nd6         48        3    0        0     1     0     1     1     0     8    0
art_heap8  4096       1    0        0     1     0     1     1     0     8    0
art_heap4  256      144    0        0     9     0     9     9     0     8    0
art_table   32      145    0        0     2     0     2     2     0     8    0
art_node    16       33    0        3     1     0     1     1     0     8    0
dirhash    1024      17    0        0     3     0     3     3     0     8    0
dino1pl    128     1414    0       19    45     0    45    45     0     8    0
ffsino     240     1414    0       19    83     0    83    83     0     8    0
nchpl      144     1639    0       35    60     0    60    60     0     8    0
uvmvnodes   72     1423    0        0    26     0    26    26     0     8    0
vnodes     208     1423    0        0    75     0    75    75     0     8    0
namei      1024    3831    0     3831     1     0     1     1     0     8    1
scxspl     192     4332    0     4332     1     0     1     1     0     8    1
plimitpl   152       14    0        8     1     0     1     1     0     8    0
sigapl     424      212    0      185     4     0     4     4     0     8    0
knotepl    112       39    0       28     1     0     1     1     0     8    0
kqueuepl   144        2    0        0     1     0     1     1     0     8    0
pipelkpl    16       67    0       60     1     0     1     1     0     8    0
pipepl     120      134    0      121     1     0     1     1     0     8    0
fdescpl    432      198    0      185     2     0     2     2     0     8    0
filepl     120      963    0      909     2     0     2     2     0     8    0
lockfpl    104        5    0        4     1     0     1     1     0     8    0
lockfspl    48        3    0        2     1     0     1     1     0     8    0
sessionpl  112       18    0        9     1     0     1     1     0     8    0
pgrppl      48       18    0        9     1     0     1     1     0     8    0
ucredpl     96       47    0       40     1     0     1     1     0     8    0
zombiepl   144      185    0      185     1     0     1     1     0     8    1
processpl  896      212    0      185     4     0     4     4     0     8    0
procpl     624      218    0      185     3     0     3     3     0     8    0
sockpl     400       71    0       54     2     0     2     2     0     8    0
mcl4k      4096      10    0       10     1     0     1     1     0     8    1
mcl2k      2048    5513    0     5479     8     3     5     8     0     8    0
mtagpl      80        2    0        2     1     1     0     1     0     8    0
mbufpl     256     9547    0     9469     7     1     6     6     0     8    0
mbufpl: pool(0xffffffff82583768:mbufpl): free list modified: page 0xfffffd805a1ea000; item ordinal 14; addr 0xfffffd805a1eaf00 (p 0xfffffd80676ec000); offset 0x0=0x0
mbufpl: pool(0xffffffff82583768:mbufpl): page inconsistency: page 0xfffffd805a1ea000; item ordinal 15; addr 0xc1
bufpl      280     3648    0      160   250     0   250   250     0     8    0
anonpl      16    20264    0    18801    15     2    13    13     0   107    7
amapchunkpl 152     699    0      637     5     0     5     5     0   158    1
amappl16   192      117    0       92     2     0     2     2     0     8    0
amappl15   184        1    0        0     1     0     1     1     0     8    0
amappl14   176        6    0        3     2     1     1     1     0     8    0
amappl13   168       27    0       24     1     0     1     1     0     8    0
amappl12   160        9    0        7     2     1     1     1     0     8    0
amappl11   152       65    0       53     1     0     1     1     0     8    0
amappl10   144       12    0        7     1     0     1     1     0     8    0
amappl9    136      211    0      209     1     0     1     1     0     8    0
amappl8    128      234    0      227     1     0     1     1     0     8    0
amappl7    120      103    0       92     1     0     1     1     0     8    0
amappl6    112       21    0       19     2     1     1     1     0     8    0
amappl5    104      158    0      149     1     0     1     1     0     8    0
amappl4     96      445    0      419     1     0     1     1     0     8    0
amappl3     88      112    0      105     1     0     1     1     0     8    0
amappl2     80      825    0      769     3     0     3     3     0     8    1
amappl1     72    13623    0    13225    27    10    17    20     0     8    8
amappl      80      419    0      393     1     0     1     1     0    84    0
dma4096    4096       1    0        1     1     1     0     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      64        1    0        0     1     0     1     1     0     8    0
uaddrrnd    24      198    0      185     1     0     1     1     0     8    0
uaddrbest   32        2    0        0     1     0     1     1     0     8    0
uaddr       24      198    0      185     1     0     1     1     0     8    0
vmmpekpl   168     6031    0     6013     1     0     1     1     0     8    0
vmmpepl    168    28990    0    28123    84     7    77    77     0   357   39
vmsppl     272      197    0      185     1     0     1     1     0     8    0
pdppl      4096     402    0      370     5     0     5     5     0     8    0
pvpl        32   103374    0    99632   113     0   113   113     0   265   81
pmappl     200      197    0      185     1     0     1     1     0     8    0
extentpl    40       46    0       29     1     0     1     1     0     8    0
phpool     112      127    0        6     4     0     4     4     0     8    0
ddb> 

Crashes (53):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/03/12 14:35 openbsd b6d7e0c74f46 d850e9d0 .config console log report syz ci-openbsd-main
2020/03/10 20:55 openbsd bfe2257568b6 35f53e45 .config console log report syz ci-openbsd-main
2020/02/28 13:30 openbsd b0694f62b628 c88c7b75 .config console log report syz ci-openbsd-main
2020/02/22 01:10 openbsd 591db234137a 2ffa6679 .config console log report syz ci-openbsd-main
2020/02/16 01:35 openbsd 8affcc51cc02 5d7b90f1 .config console log report syz ci-openbsd-main
2020/01/31 14:34 openbsd 28ad18c97173 5ed23f9a .config console log report syz ci-openbsd-main
2020/01/27 23:56 openbsd 6ee917c26eeb 56cd6c9b .config console log report syz ci-openbsd-main
2019/12/01 13:03 openbsd de4d173916c8 a76bf83f .config console log report syz ci-openbsd-main
2019/11/24 06:03 openbsd 254679ff52b1 598ca6c8 .config console log report syz ci-openbsd-main
2020/07/24 18:29 openbsd 6e780b9a59f4 554af388 .config console log report ci-openbsd-main
2020/07/23 20:19 openbsd d8b0789b8b82 70c104a1 .config console log report ci-openbsd-main
2020/07/22 04:46 openbsd 12d98fe19503 21f1765e .config console log report ci-openbsd-main
2020/07/09 20:25 openbsd 69657d9abefd ff85e8be .config console log report ci-openbsd-main
2020/07/08 20:12 openbsd 638aa2bc5640 bae5742c .config console log report ci-openbsd-main
2020/06/26 16:20 openbsd d8c65c0d1302 b202c7a8 .config console log report ci-openbsd-main
2020/06/23 08:19 openbsd 4d943fd61ab7 1afe1535 .config console log report ci-openbsd-main
2020/06/12 02:09 openbsd 39a863a0a5ba 5c25fdab .config console log report ci-openbsd-main
2020/06/08 23:47 openbsd 324b9c791e90 0d60b78a .config console log report ci-openbsd-main
2020/06/07 04:15 openbsd dfe2a24332fd e6b89e4e .config console log report ci-openbsd-main
2020/06/05 19:29 openbsd d21ef8e00906 d36418e9 .config console log report ci-openbsd-main
2020/06/02 20:09 openbsd 7d26cb49d17c 52fd7b7d .config console log report ci-openbsd-main
2020/05/31 13:58 openbsd 90b500053387 a0331e89 .config console log report ci-openbsd-main
2020/05/25 14:33 openbsd 7454d7ca9035 73964a9b .config console log report ci-openbsd-main
2020/05/24 18:13 openbsd 12bad2091a27 ce7ca010 .config console log report ci-openbsd-main
2020/05/17 02:14 openbsd 4728b9d3b42e 37bccd4e .config console log report ci-openbsd-main
2020/05/16 18:28 openbsd 4728b9d3b42e 37bccd4e .config console log report ci-openbsd-main
2020/05/08 14:14 openbsd 7bb4371dccb1 fe4122c3 .config console log report ci-openbsd-multicore
2020/04/04 12:10 openbsd 1d562564f893 d9ed075d .config console log report ci-openbsd-main
2020/04/03 00:10 openbsd e52207399465 a34e2c33 .config console log report ci-openbsd-main
2020/03/29 17:26 openbsd dbca38dca5dc 05736b29 .config console log report ci-openbsd-main
2020/03/19 18:11 openbsd 8c502e936e24 2c31c529 .config console log report ci-openbsd-main
2020/03/16 02:00 openbsd 8399ad734b90 749688d2 .config console log report ci-openbsd-main
2020/03/12 19:20 openbsd b6d7e0c74f46 d850e9d0 .config console log report ci-openbsd-main
2020/03/12 14:20 openbsd b6d7e0c74f46 d850e9d0 .config console log report ci-openbsd-main
2020/03/10 20:38 openbsd bfe2257568b6 35f53e45 .config console log report ci-openbsd-main
2020/03/01 11:02 openbsd 4a30b9e91317 c88c7b75 .config console log report ci-openbsd-main
2020/02/29 08:43 openbsd 2969925a5ca7 c88c7b75 .config console log report ci-openbsd-main
2020/02/27 15:23 openbsd d223862ca31d 40bcfdd5 .config console log report ci-openbsd-main
2020/02/22 00:57 openbsd 591db234137a 2ffa6679 .config console log report ci-openbsd-main
2020/02/11 12:10 openbsd db5b0f163dab 084454ae .config console log report ci-openbsd-main
2020/02/09 03:53 openbsd dd2e81b7e835 06150bf1 .config console log report ci-openbsd-main
2020/02/05 17:23 openbsd c244ee1bee08 662cf49a .config console log report ci-openbsd-main
2020/01/31 14:12 openbsd 28ad18c97173 5ed23f9a .config console log report ci-openbsd-main
2020/01/30 11:36 openbsd b0727cb75553 5ed23f9a .config console log report ci-openbsd-main
2020/01/20 15:53 openbsd 89a8820e5566 c40da18c .config console log report ci-openbsd-main
2019/12/27 08:16 openbsd b19021b290a5 be5c2c81 .config console log report ci-openbsd-main
2019/12/25 00:50 openbsd e22febffa296 be5c2c81 .config console log report ci-openbsd-main
2019/12/24 18:29 openbsd e22febffa296 be5c2c81 .config console log report ci-openbsd-main
2019/12/22 20:15 openbsd 3367dcf595ba 8b967267 .config console log report ci-openbsd-main
2019/12/09 20:32 openbsd d5ffb3f3aa6f b31eda3d .config console log report ci-openbsd-main
2019/12/01 12:40 openbsd de4d173916c8 a76bf83f .config console log report ci-openbsd-main
2019/11/29 23:20 openbsd f4ae6ec74ba8 3a75be00 .config console log report ci-openbsd-main
2019/11/26 02:11 openbsd 943f8c8c295c f746151a .config console log report ci-openbsd-main
* Struck through repros no longer work on HEAD.