CVS: cvs.openbsd.org: src

2022-06-29 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2022/06/29 16:45:24

Modified files:
sys/netinet6   : dest6.c ip6_input.c ip6_output.c ip6_var.h 

Log message:
Pass a pointer to mbuf pointer further down into ip6_process_hopopts()
and ip6_unknown_opt().  Instead of having dangling pointer in caller,
use m_freemp() to set mbuf to NULL.
OK sashan@



CVS: cvs.openbsd.org: src

2022-06-29 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2022/06/29 16:20:47

Modified files:
sys/net: rtable.c 

Log message:
Between the calls to art_match() and SRPL_FIRST() another CPU may
remove the route from the list.  In rtable_match() check if the
route entry is NULL.
discussed with mpi@ jmatthew@ claudio@; OK mpi@



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 15:19:21

Modified files:
lib/libssl : ssl_seclevel.c 

Log message:
Don't check the signature if a cert is self signed.

ok beck jsing



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 15:18:04

Modified files:
lib/libssl : s3_lib.c ssl_cert.c ssl_locl.h ssl_rsa.c 

Log message:
Make ssl_cert_add{0,1}_chain_cert() take ssl/ctx

ok beck jsing



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 15:17:22

Modified files:
lib/libssl : s3_lib.c ssl_cert.c ssl_locl.h ssl_rsa.c 

Log message:
ssl_cert_set{0,1}_chain() take ssl/ctx

ok beck jsing



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 15:16:30

Modified files:
lib/libssl : ssl_rsa.c 

Log message:
Add a security check to ssl_set_cert()

ok beck jsing



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 15:13:34

Modified files:
lib/libssl : ssl_rsa.c 

Log message:
Make ssl_set_{cert,pkey} take an ssl/ctx

ok beck jsing



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 15:12:19

Modified files:
lib/libssl : ssl_cert.c ssl_locl.h ssl_rsa.c 

Log message:
Refactor use_certificate_chain_* to take ssl/ctx instead of a cert

ok beck jsing



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 15:10:20

Modified files:
lib/libssl : ssl_locl.h ssl_seclevel.c 

Log message:
Add functions that check security level in certs and cert chains.

ok beck jsing



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 15:08:07

Modified files:
lib/libssl : ssl_cert.c 

Log message:
Make sure the verifier checks the security level in cert chains

ok beck jsing



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 14:06:55

Modified files:
lib/libssl : ssl_ciph.c 

Log message:
Remove a confusing comment

discussed with jsing



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 14:04:28

Modified files:
lib/libssl : ssl_ciph.c ssl_lib.c ssl_locl.h 

Log message:
Parse the @SECLEVEL=n annotation in cipher strings

To this end, hand the SSL_CERT through about 5 levels of indirection to
set an integer on it.

ok beck jsing



CVS: cvs.openbsd.org: src

2022-06-29 Thread Job Snijders
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/06/29 12:57:30

Modified files:
usr.bin/ts : ts.1 

Log message:
Manual page improvements from Leon Fischer

yep jmc@



CVS: cvs.openbsd.org: src

2022-06-29 Thread Dave Voutila
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2022/06/29 11:39:54

Modified files:
usr.sbin/vmd   : vm.c 

Log message:
vmd(8): fix off by one in vm memory range check

When inspecting if a gpa falls into a known memory range, vmd was
considering it valid 1 byte past the end resulting in selecting the
wrong starting range for the search.

ok mlarkin@



CVS: cvs.openbsd.org: src

2022-06-29 Thread Bob Beck
CVSROOT:/cvs
Module name:src
Changes by: b...@cvs.openbsd.org2022/06/29 11:39:21

Modified files:
lib/libssl : s3_lib.c ssl.h ssl_lib.c ssl_locl.h 
 ssl_tlsext.c ssl_tlsext.h tls1.h 
regress/lib/libssl/tlsext: tlsexttest.c 

Log message:
Add support for sending QUIC transport parameters

This is the start of adding the boringssl API for QUIC support,
and the TLS extensions necessary to send and receive QUIC transport
data.

Inspired by boringssl's https://boringssl-review.googlesource.com/24464

ok jsing@ tb@



CVS: cvs.openbsd.org: src

2022-06-29 Thread Job Snijders
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/06/29 11:35:44

Modified files:
distrib/sets/lists/base: mi 
distrib/sets/lists/man: mi 

Log message:
sync



CVS: cvs.openbsd.org: src

2022-06-29 Thread Job Snijders
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/06/29 10:06:22

Modified files:
usr.bin/ts : ts.1 

Log message:
Clarify the shorter default format string only applies to -i and -s



CVS: cvs.openbsd.org: src

2022-06-29 Thread Vitaliy Makkoveev
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2022/06/29 10:04:49

Modified files:
sys/net: netisr.h 

Log message:
Remove switch(4) remains.

ok claudio@ mpi@



CVS: cvs.openbsd.org: src

2022-06-29 Thread Job Snijders
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/06/29 10:01:10

Modified files:
usr.bin/ts : ts.1 ts.c 

Log message:
Add -m option to ts(1)

OK claudio@



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 09:06:18

Modified files:
regress/lib/libssl/bytestring: Makefile 
regress/lib/libssl/handshake: Makefile 
regress/lib/libssl/key_schedule: Makefile 
regress/lib/libssl/tlsext: Makefile 

Log message:
Use relative paths so beck can run regress in his git tree and have
the correct ssl_local.h etc be picked up.



CVS: cvs.openbsd.org: src

2022-06-29 Thread Dave Voutila
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2022/06/29 08:24:29

Modified files:
sys/arch/amd64/amd64: pmap.c 
sys/arch/i386/i386: pmap.c pmapae.c 

Log message:
remove archaic comment from original import of i386 pmap

This comment hasn't been relevant for at least 11 years as there's
no such lock. NetBSD removed the comment 11 years ago. No functional
change.

Discussed with mlarkin@



CVS: cvs.openbsd.org: src

2022-06-29 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/06/29 07:07:19

Modified files:
sys/kern   : init_sysent.c syscalls.c 
sys/sys: syscall.h syscallargs.h 

Log message:
Regen syscalls files as they were meant to be, correcting the "created from:" 
info

Cluebat from miod@



CVS: cvs.openbsd.org: src

2022-06-29 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/06/29 06:17:31

Modified files:
sys/kern   : init_sysent.c kern_pledge.c syscalls.c 
 syscalls.master 
sys/sys: proc.h syscall.h syscallargs.h 

Log message:
Unlock the pledge(2) system call

Protect the ps_pledge/ps_execpledge fields with ps_mtx.  Shuffle the
code to call unveil_destroy() outside the critical section.  Only writes
to those fields are protected.  Since we may only remove bits from those
fields, garbage values should do no harm even when a read crosses
a write on 32 bits systems.

Input claudio@ kettenis@ deraadt@, ok deraadt@



CVS: cvs.openbsd.org: src

2022-06-29 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/06/29 06:06:11

Modified files:
sys/sys: syscall_mi.h 

Log message:
Simplify the locking dance around pledge_syscall()

It doesn't make sense to wrap this function with the kernel lock only
when the syscall to be executed is itself locked.  Instead
pledge_syscall() should be always safe to execute without the kernel
lock.

"looks good" kettenis@, ok deraadt@



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 06:03:38

Modified files:
lib/libssl : ssl_locl.h 

Log message:
whitespace nit



CVS: cvs.openbsd.org: src

2022-06-29 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/06/29 06:01:22

Modified files:
sys/kern   : kern_pledge.c 

Log message:
Use READ_ONCE() when saving pr->ps_pledge to a local variable

This prevents the compiler from reloading a possibly different value
from memory.  Even if it doesn't matter in this code it's just better
practice.  Discussed with kettenis@ and deraadt@, ok deraadt@



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 05:59:23

Modified files:
lib/libssl : ssl_seclevel.c 

Log message:
missing blank line



CVS: cvs.openbsd.org: src

2022-06-29 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2022/06/29 05:22:10

Modified files:
sys/netinet6   : ip6_input.c 

Log message:
Pass down the pointer to mbuf pointer into ip6_hbhchcheck().  This
allows to set the mbuf to NULL and keep it consistent in the caller,
instead of having dangling pointer after free.
OK sashan@



CVS: cvs.openbsd.org: src

2022-06-29 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2022/06/29 04:48:22

Modified files:
sys/kern   : kern_sig.c 

Log message:
Move the deep check back into the loop. There are ways that even though
we're deep the code will SSTOP and sleep and then on wakeup we need to
recheck the deep conditions.
Issue analyzed and OK by mpi@

Reported-by: syzbot+f7634539e73108238...@syzkaller.appspotmail.com



CVS: cvs.openbsd.org: src

2022-06-29 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/06/29 04:04:22

Modified files:
sys/dev/pci/drm/i915/display: intel_dpll_mgr.c 

Log message:
drm/i915: Implement w/a 22010492432 for adl-s

>From Ville Syrjala
0895a2235bae6671077c2de94268346005d6 in linux 5.15.y/5.15.51
13bd259b64bb58ae130923ada42ebc19bf3f2fa2 in mainline linux



CVS: cvs.openbsd.org: src

2022-06-29 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/06/29 03:52:23

Modified files:
sys/dev/pci/drm/include/linux: kernel.h 

Log message:
correct vararg use in kasprintf/kvasprintf
fixes names of some encoders



CVS: cvs.openbsd.org: src

2022-06-29 Thread Stuart Henderson
CVSROOT:/cvs
Module name:src
Changes by: st...@cvs.openbsd.org   2022/06/29 03:33:18

Modified files:
distrib/sets/lists/base: mi 
distrib/sets/lists/man: mi 

Log message:
sync



CVS: cvs.openbsd.org: src

2022-06-29 Thread Martijn van Duren
CVSROOT:/cvs
Module name:src
Changes by: mart...@cvs.openbsd.org 2022/06/29 03:10:14

Modified files:
usr.sbin/ldapd : auth.c 

Log message:
Use strncasecmp instead of strncmp when comparing the password scheme.
This change could theoretically affect some people who actually have one
of the scheme's in lower case in their password, but this is extremely
unlikely in the real world.

Pointed out by David Diggles (david  elven  com  au)
OK sthen@



CVS: cvs.openbsd.org: src

2022-06-29 Thread Vitaliy Makkoveev
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2022/06/29 03:08:07

Modified files:
sys/net: if.c if_ethersubr.c if_pppoe.c if_pppoe.h 
 netisr.h 

Log message:
ether_input() called with shared netlock, but pppoe(4) wants it to be
exclusive. Do the pppoe(4) input within netisr handler with exclusive
netlok held and remove kernel lock hack from ether_input().

This is the step back, but it makes ether_input() path better then it
is now.

Tested by Hrvoje Popovski.

ok bluhm@ claudio@



CVS: cvs.openbsd.org: src

2022-06-29 Thread Vitaliy Makkoveev
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2022/06/29 03:01:48

Modified files:
sys/netinet: ip_input.c 

Log message:
Nullify `ipsecflowinfo' when mbuf(9) has no ipsec flowinfo data.
Otherwise we use `ipsecflowinfo' obtained from previous packet.

ok claudio@



CVS: cvs.openbsd.org: src

2022-06-29 Thread Bob Beck
CVSROOT:/cvs
Module name:src
Changes by: b...@cvs.openbsd.org2022/06/29 02:56:45

Modified files:
lib/libcrypto/asn1: a_time_tm.c asn1_locl.h tasn_dec.c 

Log message:
Refactor asn1 time parsing to use CBS - enforce valid times in ASN.1 parsing.

While we're here enforce valid days for months and leap years.

Inspired by same in boringssl.

ok jsing@



CVS: cvs.openbsd.org: src

2022-06-29 Thread Job Snijders
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/06/29 02:39:49

Modified files:
usr.bin: Makefile 
Added files:
usr.bin/ts : Makefile ts.1 ts.c 

Log message:
Import ts(1) - a timestamp utility

A from scratch & pledged implementation of the perl 'ts' utility found
in the moreutils collection.

With help from florian@, tb@, and deraadt@

OK deraadt@



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 02:39:08

Modified files:
lib/libssl : ssl_lib.c 

Log message:
Also check the security level in SSL_get1_supported_ciphers

ok beck jsing



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 02:38:01

Modified files:
lib/libssl : ssl_ciphers.c 

Log message:
Check security level when convertin a cipher list to bytes

ok beck jsing



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 02:37:18

Modified files:
lib/libssl : s3_lib.c 

Log message:
Also check the security level when choosing a shared cipher

ok beck jsing



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 02:34:04

Modified files:
lib/libssl : ssl_clnt.c 

Log message:
There's tentacles, tentacles everywhere

ok beck jsing



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 02:30:04

Modified files:
lib/libssl : s3_lib.c ssl_locl.h ssl_seclevel.c 

Log message:
Also check the security level of the 'tmp dh'

ok beck jsing



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 02:27:52

Modified files:
lib/libssl : ssl_clnt.c ssl_locl.h ssl_seclevel.c ssl_srvr.c 
 tls_internal.h tls_key_share.c 

Log message:
Check the security of DH key shares

ok beck, looks good to jsing



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 01:59:15

Modified files:
lib/libssl : ssl_locl.h 

Log message:
Rename one s to ssl for consistency



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 01:55:59

Modified files:
lib/libssl : ssl_sigalgs.c 

Log message:
Check sigalg security level when selecting them.

ok beck jsing



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 01:54:54

Modified files:
lib/libssl : ssl_sigalgs.c 

Log message:
Check the security bits of the sigalgs' pkey

ok beck jsing



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 01:53:58

Modified files:
lib/libssl : ssl_sigalgs.c ssl_sigalgs.h ssl_srvr.c 
 ssl_tlsext.c 

Log message:
Check the security level when building sigalgs

ok beck jsing



CVS: cvs.openbsd.org: src

2022-06-29 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/06/29 01:53:00

Modified files:
lib/libssl : ssl_sigalgs.c ssl_sigalgs.h 

Log message:
Annotate sigalgs with their security level.

ok beck jsing



CVS: cvs.openbsd.org: src

2022-06-29 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2022/06/29 01:51:54

Modified files:
sys/arch/amd64/amd64: machdep.c 
sys/arch/amd64/include: biosvar.h 

Log message:
Add support for using non-standard UARTs (such as the Synopsys DesignWare
UART found on AMD's Ryzen Embedded V1000 family) as an early console.
This requires additional parameters to be passed by the bootloader to the
kernel so it changes the struct for the BOOTARG_CONSDEV boot argument.
The old struct will still be supported until OpenBSD 7.3 has been released
such that new kernels boot with the old bootloader.

ok anton@, deraadt@



CVS: cvs.openbsd.org: src

2022-06-29 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2022/06/29 01:44:10

Modified files:
sys/arch/amd64/amd64: bus_space.c 

Log message:
Make bus_space_map(9) work before the pmap is initialized for addresses
below 4G by using the direct map.

ok anton@, deraadt@



Re: CVS: cvs.openbsd.org: src

2022-06-29 Thread Martin Pieuchot
On 29/06/22(Wed) 07:02, Anton Lindqvist wrote:
> On Tue, Jun 28, 2022 at 06:08:18AM -0600, Claudio Jeker wrote:
> > CVSROOT:/cvs
> > Module name:src
> > Changes by: clau...@cvs.openbsd.org 2022/06/28 06:08:18
> > 
> > Modified files:
> > sys/kern   : kern_sig.c 
> > 
> > Log message:
> > Cleanup the sleep loop in single_thread_check_locked(). The deep checks
> > only matter on entry and the pr->ps_single check is done in the while body.
> > With and OK mpi@
> 
> syzkaller just found a reproducer for the following panic. Is it related
> to this commit?

I believe it is.  If there's a race between SINGLE_SUSPEND and
PS_SINGLEEXIT the deep check should be re-done.

The problem reported by syzkaller is a lock ordering issue.  The SCHED_LOCK()
is held when trying to grab the KERNEL_LOCK().  This can only happen if
a thread is calling exit1() inside single_thread_check_locked() but that
should only be possible at the boundary of the kernel not in the middle
of a sleep.

So I believe this change was wrong and we should revert it.  Thanks!

> > syzbot has found a reproducer for the following issue on:
> > 
> > HEAD commit:37c734d33dee constify miscellaneous arm64 pin and clock ta..
> > git tree:   openbsd
> > console output: https://syzkaller.appspot.com/x/log.txt?x=1397129808
> > kernel config:  https://syzkaller.appspot.com/x/.config?x=7058272de1526588
> > dashboard link: https://syzkaller.appspot.com/bug?extid=f7634539e73108238c2a
> > syz repro:  https://syzkaller.appspot.com/x/repro.syz?x=17fe7ac008
> > C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1625358808
> > 
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+f7634539e73108238...@syzkaller.appspotmail.com
> > 
> > panic: kernel diagnostic assertion "__mp_lock_held(&sched_lock, curcpu()) 
> > == 0" failed: file 
> > "/syzkaller/managers/setuid/kernel/sys/kern/kern_lock.c", line 63
> > Stopped at  db_enter+0x18:  addq$0x8,%rsp
> > TIDPIDUID PRFLAGS PFLAGS  CPU  COMMAND
> > *226148  13902  0  0x1802  0x40800801  syz-executor2883823057
> > db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437
> > panic(8259bd82) at panic+0x177 sys/kern/subr_prf.c:202
> > __assert(8261504d,8261b5a3,3f,8264d4fb) at 
> > __assert+0x25 sys/kern/subr_prf.c:161
> > _kernel_lock() at _kernel_lock+0xb2 sys/kern/kern_lock.c:63
> > single_thread_check_locked(800021232548,1,c) at 
> > single_thread_check_locked+0x1f6 sys/kern/kern_sig.c:2037
> > single_thread_check(800021232548,1) at single_thread_check+0x4b 
> > sys/kern/kern_sig.c:2057
> > sleep_finish(8000212c2550,1) at sleep_finish+0x75 sleep_signal_check 
> > sys/kern/kern_synch.c:464 [inline]
> > sleep_finish(8000212c2550,1) at sleep_finish+0x75 
> > sys/kern/kern_synch.c:400
> > rwsleep(800021232548,82957750,120,82595e88,0) at 
> > rwsleep+0xd5 sys/kern/kern_synch.c:314
> > futex_wait(bc96a93640,1,0,2) at futex_wait+0x13c sys/kern/sys_futex.c:260
> > sys_futex(800021232548,8000212c26e0,8000212c2740) at 
> > sys_futex+0xf8 sys/kern/sys_futex.c:111
> > syscall(8000212c27b0) at syscall+0x484 mi_syscall 
> > sys/sys/syscall_mi.h:102 [inline]
> > syscall(8000212c27b0) at syscall+0x484 sys/arch/amd64/amd64/trap.c:585
> > Xsyscall() at Xsyscall+0x128
> > end of kernel
> > end trace frame: 0xbcc5099500, count: 3
> > 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{1}> 
> > ddb{1}> set $lines = 0
> > ddb{1}> set $maxwidth = 0
> > ddb{1}> show panic
> > *cpu1: kernel diagnostic assertion "__mp_lock_held(&sched_lock, curcpu()) 
> > == 0" failed: file 
> > "/syzkaller/managers/setuid/kernel/sys/kern/kern_lock.c", line 63
> > ddb{1}> trace
> > db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437
> > panic(8259bd82) at panic+0x177 sys/kern/subr_prf.c:202
> > __assert(8261504d,8261b5a3,3f,8264d4fb) at 
> > __assert+0x25 sys/kern/subr_prf.c:161
> > _kernel_lock() at _kernel_lock+0xb2 sys/kern/kern_lock.c:63
> > single_thread_check_locked(800021232548,1,c) at 
> > single_thread_check_locked+0x1f6 sys/kern/kern_sig.c:2037
> > single_thread_check(800021232548,1) at single_thread_check+0x4b 
> > sys/kern/kern_sig.c:2057
> > sleep_finish(8000212c2550,1) at sleep_finish+0x75 sleep_signal_check 
> > sys/kern/kern_synch.c:464 [inline]
> > sleep_finish(8000212c2550,1) at sleep_finish+0x75 
> > sys/kern/kern_synch.c:400
> > rwsleep(800021232548,82957750,120,82595e88,0) at 
> > rwsleep+0xd5 sys/kern/kern_synch.c:314
> > futex_wait(bc96a93640,1,0,2) at futex_wait+0x13c sys/kern/sys_futex.c:260
> > sys_futex(800021232548,8000212c26e0,8000212c2740) at 
> > sys_futex+0xf8 sys/kern/sys_futex.c:111
> > syscall(8