syzbot


panic: unhandled af (3)

Status: closed as invalid on 2020/10/03 07:42
Reported-by: syzbot+741ced1e7369c2ac70ae@syzkaller.appspotmail.com
First crash: 1484d, last: 1475d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
openbsd panic: unhandled af C 21 1661d 1663d 3/3 fixed on 2020/01/09 12:20
openbsd panic: unhandled af (4) syz 11 913d 942d 3/3 fixed on 2022/01/25 13:33
openbsd panic: unhandled af (2) C 22 1487d 1513d 3/3 fixed on 2020/06/28 14:37

Sample crash report:
panic: unhandled af 0
Stopped at      db_enter+0x18:  addq    $0x8,%rsp
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
*330922  29787      0     0x14000 0x40000200    0K softclock
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff8240d8e8) at panic+0x15c sys/kern/subr_prf.c:207
unhandled_af(0) at unhandled_af+0x16
pf_addrcpy(ffff800020d96d50,ffff800000aaa780,0) at pf_addrcpy+0x99 sys/net/pf.c:409
pf_map_addr(0,ffff800000aaa538,ffff800020d97018,ffff800020d96d50,ffff800020d96c60,ffff800020d96eb8) at pf_map_addr+0x3f7 sys/net/pf_lb.c:393
pf_get_sport(ffff800020d97000,ffff800000aaa538,ffff800020d96d50,ffff800020d96d76,0,0) at pf_get_sport+0xc7 sys/net/pf_lb.c:159
pf_get_transaddr_af(ffff800000aaa538,ffff800020d97000,ffff800020d96eb8) at pf_get_transaddr_af+0x154 sys/net/pf_lb.c:733
pf_get_transaddr(ffff800000aaa538,ffff800020d97000,ffff800020d96eb8,ffff800020d96ee0) at pf_get_transaddr+0x89 sys/net/pf_lb.c:657
pf_test_rule(ffff800020d97000,ffff800020d970f0,ffff800020d97100,ffff800020d970e0,ffff800020d970c8,3) at pf_test_rule+0x495 sys/net/pf.c:3822
pf_test(18,2,ffff800000ac6000,ffff800020d97290) at pf_test+0x1a35 sys/net/pf.c:7025
ip6_output(fffffd806f120100,ffffffff828af360,0,0,ffff800020d97328,0) at ip6_output+0x115c sys/netinet6/ip6_output.c:618
mld6_sendpkt(ffff800000af5980,83,0) at mld6_sendpkt+0x2da sys/netinet6/mld6.c:465
mld6_fasttimeo() at mld6_fasttimeo+0x162 mld6_checktimer sys/netinet6/mld6.c:363 [inline]
mld6_fasttimeo() at mld6_fasttimeo+0x162 sys/netinet6/mld6.c:341
pffasttimo(ffffffff828aeec0) at pffasttimo+0x85 sys/kern/uipc_domain.c:292
end trace frame: 0xffff800020d97470, 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{0}> 
ddb{0}> set $lines = 0
ddb{0}> set $maxwidth = 0
ddb{0}> show panic
unhandled af 0
ddb{0}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff8240d8e8) at panic+0x15c sys/kern/subr_prf.c:207
unhandled_af(0) at unhandled_af+0x16
pf_addrcpy(ffff800020d96d50,ffff800000aaa780,0) at pf_addrcpy+0x99 sys/net/pf.c:409
pf_map_addr(0,ffff800000aaa538,ffff800020d97018,ffff800020d96d50,ffff800020d96c60,ffff800020d96eb8) at pf_map_addr+0x3f7 sys/net/pf_lb.c:393
pf_get_sport(ffff800020d97000,ffff800000aaa538,ffff800020d96d50,ffff800020d96d76,0,0) at pf_get_sport+0xc7 sys/net/pf_lb.c:159
pf_get_transaddr_af(ffff800000aaa538,ffff800020d97000,ffff800020d96eb8) at pf_get_transaddr_af+0x154 sys/net/pf_lb.c:733
pf_get_transaddr(ffff800000aaa538,ffff800020d97000,ffff800020d96eb8,ffff800020d96ee0) at pf_get_transaddr+0x89 sys/net/pf_lb.c:657
pf_test_rule(ffff800020d97000,ffff800020d970f0,ffff800020d97100,ffff800020d970e0,ffff800020d970c8,3) at pf_test_rule+0x495 sys/net/pf.c:3822
pf_test(18,2,ffff800000ac6000,ffff800020d97290) at pf_test+0x1a35 sys/net/pf.c:7025
ip6_output(fffffd806f120100,ffffffff828af360,0,0,ffff800020d97328,0) at ip6_output+0x115c sys/netinet6/ip6_output.c:618
mld6_sendpkt(ffff800000af5980,83,0) at mld6_sendpkt+0x2da sys/netinet6/mld6.c:465
mld6_fasttimeo() at mld6_fasttimeo+0x162 mld6_checktimer sys/netinet6/mld6.c:363 [inline]
mld6_fasttimeo() at mld6_fasttimeo+0x162 sys/netinet6/mld6.c:341
pffasttimo(ffffffff828aeec0) at pffasttimo+0x85 sys/kern/uipc_domain.c:292
timeout_run(ffffffff828aeec0) at timeout_run+0xc4 timeout_sync_leave sys/kern/kern_timeout.c:184 [inline]
timeout_run(ffffffff828aeec0) at timeout_run+0xc4 sys/kern/kern_timeout.c:490
softclock_thread(ffff800020d889c0) at softclock_thread+0x16a sys/kern/kern_timeout.c:580
end trace frame: 0x0, count: -16
ddb{0}> show registers
rdi                                0
rsi                              0x1
rbp               0xffff800020d969f0
rbx               0xffff800020d96aa0
rdx                             0x8b
rcx                              0x2
rax                              0x1
r8                0xffffffff821f795f    kprintf+0x16f
r9                               0x1
r10                              0x2
r11               0xd72865409519c866
r12                     0x3000000008
r13               0xffff800020d96a00
r14                            0x100
r15                              0x1
rip               0xffffffff81a0af38    db_enter+0x18
cs                               0x8
rflags                         0x246
rsp               0xffff800020d969e0
ss                              0x10
db_enter+0x18:  addq    $0x8,%rsp
ddb{0}> show proc
PROC (softclock) pid=330922 stat=onproc
    flags process=14000<NOZOMBIE,SYSTEM> proc=40000200<SYSTEM,CPUPEG>
    pri=0, usrpri=50, nice=20
    forw=0xffffffffffffffff, list=0xffff800020d88ea0,0xffff800020d88760
    process=0xffff800020d8af80 user=0xffff800020d92000, vmspace=0xffffffff828bce78
    estcpu=0, cpticks=0, pctcpu=0.0
    user=0, sys=0, intr=0
ddb{0}> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
 52630  178432  78459      0  3        0x80  nanosleep     syz-executor.0
 52630  255579  78459      0  3   0x4000080  fsleep        syz-executor.0
 52630  447660  78459      0  3   0x4000080  fsleep        syz-executor.0
 13519  166741  80246      0  3        0x82  nanosleep     syz-executor.1
 78459  346253  80246      0  3        0x82  nanosleep     syz-executor.0
 80246   42547  88170      0  3        0x82  thrsleep      syz-execprog
 80246  174755  88170      0  3   0x4000082  thrsleep      syz-execprog
 80246  144643  88170      0  3   0x4000082  thrsleep      syz-execprog
 80246   40378  88170      0  3   0x4000082  thrsleep      syz-execprog
 80246  244737  88170      0  3   0x4000082  thrsleep      syz-execprog
 80246  218476  88170      0  3   0x4000082  kqread        syz-execprog
 80246  229943  88170      0  3   0x4000082  thrsleep      syz-execprog
 80246   48466  88170      0  3   0x4000082  thrsleep      syz-execprog
 80246  450531  88170      0  3   0x4000082  thrsleep      syz-execprog
 80246  348436  88170      0  3   0x4000082  thrsleep      syz-execprog
 88170   81568  78326      0  3    0x10008a  pause         ksh
 78326  125081  86146      0  3        0x92  select        sshd
 39043  225071      1      0  3    0x100083  ttyin         getty
 86146  103690      1      0  3        0x80  select        sshd
 73092  191403  38104     74  3    0x100092  bpf           pflogd
 38104  119956      1      0  3        0x80  netio         pflogd
 96305  263446   6013     73  3    0x100090  kqread        syslogd
  6013   48191      1      0  3    0x100082  netio         syslogd
 52210  494019      1     77  3    0x100090  poll          dhclient
 60722  197832      1      0  3        0x80  poll          dhclient
 82005  286300      0      0  3     0x14200  bored         smr
 68105  372925      0      0  3     0x14200  pgzero        zerothread
 81972  365322      0      0  3     0x14200  aiodoned      aiodoned
 92983   99642      0      0  3     0x14200  syncer        update
 12562  400222      0      0  3     0x14200  cleaner       cleaner
 53462  224872      0      0  3     0x14200  reaper        reaper
  1808  243750      0      0  3     0x14200  pgdaemon      pagedaemon
 99071  160835      0      0  3     0x14200  bored         crynlk
 19960  224979      0      0  3     0x14200  bored         crypto
 55474   62447      0      0  3  0x40014200  acpi0         acpi0
 46127   24634      0      0  7  0x40014200                idle1
  7238  360417      0      0  3     0x14200  bored         softnet
 41043  482174      0      0  3     0x14200  bored         systqmp
 95154   21580      0      0  3     0x14200  bored         systq
*29787  330922      0      0  7  0x40014200                softclock
 23891  242367      0      0  3  0x40014200                idle0
     1  149540      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper
ddb{0}> show all locks
Process 29787 (softclock) thread 0xffff800020d889c0 (330922)
exclusive rwlock netlock r = 0 (0xffffffff8270c198)
#0  witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline]
#0  witness_lock+0x4c7 sys/kern/subr_witness.c:1164
#1  mld6_fasttimeo+0x1d sys/netinet6/mld6.c:336
#2  pffasttimo+0x85 sys/kern/uipc_domain.c:292
#3  timeout_run+0xc4 timeout_sync_leave sys/kern/kern_timeout.c:184 [inline]
#3  timeout_run+0xc4 sys/kern/kern_timeout.c:490
#4  softclock_thread+0x16a sys/kern/kern_timeout.c:580
#5  proc_trampoline+0x1c
shared rwlock timeout r = 0 (0xffffffff827a9640)
#0  witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline]
#0  witness_lock+0x4c7 sys/kern/subr_witness.c:1164
#1  timeout_run+0xb9 sys/kern/kern_timeout.c:489
#2  softclock_thread+0x16a sys/kern/kern_timeout.c:580
#3  proc_trampoline+0x1c
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8291b1c8)
#0  witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline]
#0  witness_lock+0x4c7 sys/kern/subr_witness.c:1164
#1  __mp_acquire_count+0x51 sys/kern/kern_lock.c:227
#2  mi_switch+0x392 sys/kern/sched_bsd.c:435
#3  sleep_finish+0x113 sys/kern/kern_synch.c:418
#4  softclock_thread+0x103 sys/kern/kern_timeout.c:575
#5  proc_trampoline+0x1c
ddb{0}> show malloc
           Type InUse  MemUse  HighUse   Limit  Requests Type Lim
         devbuf  9471   6398K    6398K  78643K     10564        0
            pcb    13      8K       8K  78643K        13        0
         rtable   110      4K       5K  78643K       206        0
         ifaddr    45     10K      10K  78643K        46        0
       counters    43     33K      33K  78643K        43        0
       ioctlops     0      0K       8K  78643K      2416        0
          mount     1      1K       1K  78643K         1        0
         vnodes  1183     74K      75K  78643K      1188        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      1K       1K  78643K         2        0
            sem     2      0K       0K  78643K         2        0
        dirhash    12      2K       2K  78643K        12        0
           ACPI  1824    197K     290K  78643K     13058        0
      file desc     4     12K      24K  78643K       512        0
           proc    59     63K      95K  78643K       438        0
    NFS srvsock     1      0K       0K  78643K         1        0
     NFS daemon     1     16K      16K  78643K         1        0
       in_multi    33      2K       2K  78643K        33        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       210        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    78     20K      20K  78643K      2368        0
       UVM aobj     3      2K       2K  78643K         3        0
        memdesc     1      4K       4K  78643K         1        0
    crypto data     1      1K       1K  78643K         1        0
            NDP     6      0K       0K  78643K        10        0
           temp    34   3855K    3919K  78643K      2929        0
         kqueue     3      4K       4K  78643K         3        0
      SYN cache     2     16K      16K  78643K         2        0
ddb{0}> 

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/07/09 09:13 openbsd 09dd33a6a6aa bc238812 .config console log report syz ci-openbsd-multicore
2020/07/05 09:43 openbsd f724afe49a5c bed10395 .config console log report syz ci-openbsd-multicore
2020/06/30 05:06 openbsd 83fd2a221a65 ce9ef6f2 .config console log report syz ci-openbsd-multicore
2020/07/09 08:56 openbsd 09dd33a6a6aa bc238812 .config console log report ci-openbsd-multicore
2020/07/05 09:27 openbsd f724afe49a5c bed10395 .config console log report ci-openbsd-multicore
2020/06/30 09:28 openbsd 7137d9bb1557 917afeaa .config console log report ci-openbsd-multicore
2020/06/30 04:40 openbsd 83fd2a221a65 ce9ef6f2 .config console log report ci-openbsd-multicore
* Struck through repros no longer work on HEAD.