Commit Graph

294984 Commits

Author SHA1 Message Date
yamaguchi cb05cbaab1 Added Intel X710 devices and rename X710_10G_T to X710_10G_T_1 2022-03-16 05:20:11 +00:00
simonb c69d82a137 Add the increasingly spreading __HIDE_DELAY kludge to evbmips. 2022-03-16 04:31:54 +00:00
dholland f47c379500 setpgid.2: Mention that both child and parent need to call it.
Absence of this standard info was noticed by riastradh@.
2022-03-16 00:50:40 +00:00
dholland 7c57e0878d web2: +enqueue 2022-03-16 00:01:03 +00:00
andvar a294b89509 s/heaader/header/ 2022-03-15 21:39:59 +00:00
christos 74ec86eb01 new OpenSSL 2022-03-15 21:02:11 +00:00
christos 9330ead582 merge OpenSSL-1.1.1m and OpenSSL-1.1.1n 2022-03-15 20:51:12 +00:00
christos d3425df3f6 Import OpenSSL-1.1.1n security fix
Changes between 1.1.1m and 1.1.1n [15 Mar 2022]

  *) Fixed a bug in the BN_mod_sqrt() function that can cause it to loop forever
     for non-prime moduli.

     Internally this function is used when parsing certificates that contain
     elliptic curve public keys in compressed form or explicit elliptic curve
     parameters with a base point encoded in compressed form.

     It is possible to trigger the infinite loop by crafting a certificate that
     has invalid explicit curve parameters.

     Since certificate parsing happens prior to verification of the certificate
     signature, any process that parses an externally supplied certificate may
     thus be subject to a denial of service attack. The infinite loop can also
     be reached when parsing crafted private keys as they can contain explicit
     elliptic curve parameters.

     Thus vulnerable situations include:

      - TLS clients consuming server certificates
      - TLS servers consuming client certificates
      - Hosting providers taking certificates or private keys from customers
      - Certificate authorities parsing certification requests from subscribers
      - Anything else which parses ASN.1 elliptic curve parameters

     Also any other applications that use the BN_mod_sqrt() where the attacker
     can control the parameter values are vulnerable to this DoS issue.
     (CVE-2022-0778)
     [Tomáš Mráz]

  *) Add ciphersuites based on DHE_PSK (RFC 4279) and ECDHE_PSK (RFC 5489)
     to the list of ciphersuites providing Perfect Forward Secrecy as
     required by SECLEVEL >= 3.

     [Dmitry Belyavskiy, Nicola Tuveri]
2022-03-15 20:47:08 +00:00
wiz daf1fd209f new openssl out 2022-03-15 18:18:27 +00:00
hannken 6b41017033 vrelel(): No need to test usecount if VGET marker is clear.
Assert "usecount == 1" instead.
2022-03-15 15:27:43 +00:00
riastradh b90f3afc19 bpf(4): Handle null bf_insn on free.
This is not guaranteed by bpf_setf to be nonnull.

Reported-by: syzbot+de1ec9471dfc2f283dda@syzkaller.appspotmail.com
2022-03-15 13:00:44 +00:00
riastradh 841c8d0168 posix_fadvise(2): Detect arithmetic overflow without UB.
Reported-by: syzbot+18f01abff11bd527c464@syzkaller.appspotmail.com
2022-03-15 10:37:42 +00:00
riastradh 9529bac45e tun(4): Fix bug introduced in previous locking change.
Now that tun_lock runs at IPL_NONE, taking it does not have the side
effect of disabling preemption, but pktq_enqueue assumes the caller
has disabled preemption so it can safely schedule a softint.

This isn't a problem in most physical network drivers because the
pktq_enqueue call happens from within the driver's softint context
anyway.  But tun(4) is special -- here, the pktq_enqueue is triggered
by a userland write to the device, which is in thread context.  So
let's just disable preemption in tunwrite.

Reported-by: syzbot+21c2cb300f1ec2162b35@syzkaller.appspotmail.com
2022-03-15 00:05:17 +00:00
perseant 82a3f34c53 Avoid an unaccounted extra channel freeze, if a reset is requested
more than once before the thread services the request.  Closes PR#56745.
2022-03-14 22:15:51 +00:00
riastradh f39c6c80d5 system(3): Simplify initialization of argp. 2022-03-14 22:14:19 +00:00
riastradh fd1bd01dd5 system(3): Switch from vfork/execve to posix_spawn.
Changes by me:
- Minor style nits.
- Set errno on posix_spawn failure.
- Handle edge cases of SIGINT/SIGQUIT set to SIG_IGN by caller.


Author: Nikita Ronja Gillmann <nikita@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>
2022-03-14 22:06:28 +00:00
riastradh 60d621cc5a audio(4): Fix typo in previous -- atomic_store_release, not reease.
Built the wrong kernel to compile-test AUDIO_DEBUG, oops.
2022-03-14 21:38:04 +00:00
jkoshy cdbf1fe1d8 Sync libdwarf's manual pages with upstream [r3964]. 2022-03-14 20:50:48 +00:00
rillig ca48e3c506 tests/lint: fix test about "non-portable character constant" on uchar
The warning is wrong, and it has been for a long time.  For now just fix
the test to match the actual output.  Seen on evbarm, which is one of
the platforms where a plain char is unsigned.

Noticed by Martin.
2022-03-14 20:25:26 +00:00
mlelstv a0e4d6d3d7 Silently ignore fstab entries with NAME= entries that cannot be resolved.
Fixes PR 56249.
2022-03-14 18:38:11 +00:00
riastradh 8d83d79bc5 umidi(4): Bail early if no endpoints.
kmem_alloc is unhappy with zero-size allocation.

Reported-by: syzbot+483b984480c295979391@syzkaller.appspotmail.com
2022-03-14 16:14:11 +00:00
uwe 331aee3e20 virtio_pci_match: add TODO about PCI Revision ID.
The standard says:

  Transitional devices MUST have a PCI Revision ID of 0.

  Non-transitional devices SHOULD have a PCI Revision ID of 1 or higher.
  Drivers MUST match any PCI Revision ID value.

so we must not check the revision id for non-transitional devices.
The code in attach relies on the revision being specifically(NB!) 1 so
this calls for a revision, but I can't test this properly at the
moment, so just leave a reminder.  Comment change only.
2022-03-14 12:22:02 +00:00
riastradh 4aa8840f0c syscall(2): Provide better attribution for biglock slippage.
This adds a small overhead to the syscall path, but only when invoked
via the syscall(2) syscall, for which stack traces generally don't
print the actual syscall number in question so the better attribution
may make a difference.
2022-03-14 12:02:19 +00:00
riastradh 826d03fdc0 audio(4): Membar audit.
Won't affect anything on x86 because atomic r/m/w operations are
always full sequential consistency barriers, but might potentially
fix problems on, e.g., arm.

Note 1: I'm not clear on why the track lock is a bespoke mutex made
out of an atomic -- why not just mutex(9)?

Note 2: I'm not convinced the audio_mlog_flush synchronization is
correct; what happens if the softint runs on two CPUs at the same
time and swaps mlog_wpage simultaneously?

Note 3: Should maybe use atomic_load/store_relaxed for mlog_full and
mlog_drop, and atomic_inc/dec for mlog_refs.
2022-03-14 11:47:33 +00:00
mlelstv cfdc83f9e5 Additional channel flags. 2022-03-14 07:05:31 +00:00
mlelstv e79b35ddff Add OpenBSD to code to optionally load CLM (Country Locale Matrix) files. 2022-03-14 06:40:12 +00:00
mrg 9f9885767c in bozo_init_prefs(), default to returning 1 (success) and if a
bozo_set_pref() fails, return 0 instead.  fixes PR#54785 but with
a different patch.
2022-03-14 05:58:36 +00:00
mrg 131540c824 apply some NetBSD_Disabled_make.info: love to avoid a source tree
timestamp issue with read-only sources.  fixes PR#42497.
2022-03-14 05:50:08 +00:00
mrg 389848dbad check for scandir() returning -1. should handle PR#56358. 2022-03-14 05:06:59 +00:00
andvar 081a97db4b s/entreed/entered/ 2022-03-13 22:18:56 +00:00
riastradh 07d784e1ca tun(4): Fix some error branches in tunwrite. 2022-03-13 21:42:39 +00:00
riastradh 797fd8b89e tun(4): Omit TUN_RWAIT micro-optimization.
cv_broadcast aleady has a fast path for no-waiters.
2022-03-13 21:32:43 +00:00
riastradh f4bb48a71a tun(4): Deliver SIGIO for hangup under tun_lock.
Otherwise, tp->tun_pgid is not stable.
2022-03-13 21:32:35 +00:00
riastradh 5ee164d90c tun(4): Reduce lock from IPL_NET to IPL_SOFTNET.
This is never taken from hardware interrupt handlers any more, as far
as I can tell -- only SOFTINT_NET soft interrupt handlers.

This avoids trying to take an adaptive lock, proc_lock, in fownsignal
while holding a spin lock.  Unfortunately, it doesn't entirely fix the
problem -- proc_lock is at IPL_NONE, and is held across some not
entirely trivial computations like allocating a new pid table.  So it
would really be better if we had some way to deliver SIGIO without
taking proc_lock.

Reported-by: syzbot+3dd54993d3e92e697e72@syzkaller.appspotmail.com
Reported-by: syzbot+aca29415f2f0bf23f082@syzkaller.appspotmail.com
2022-03-13 21:32:27 +00:00
riastradh dd0c4ef674 tun(4): Reduce tun_softc_lock from IPL_NET to IPL_NONE.
This is always taken in process/thread context, never in interrupt
context, hard or soft.
2022-03-13 21:32:15 +00:00
riastradh c08c13fa51 tun(4): Factor out setup/teardown into separate routines.
- Reduce duplication.
- Plug softint leak on recycling tun.

(This recycling business seems kinda sketchy...)
2022-03-13 21:32:07 +00:00
riastradh c8f9fb353f tun(4): Add missing includes in if_tun.h. 2022-03-13 21:31:58 +00:00
riastradh a17241a025 tun(4): Add missing cv_destroy in tunclose. 2022-03-13 21:31:47 +00:00
riastradh eb8f25ea63 usb: Fix debug build. 2022-03-13 20:44:06 +00:00
mrg be445615ae don't disable the spi any more. it works fine (and i'm booting
from it on one pbp directly to nvme.)
2022-03-13 19:32:07 +00:00
riastradh de8552b00b kern: Use harmless, not harmful, integer truncation in physio.
Reported-by: syzbot+13abd9bc700f7ceac337@syzkaller.appspotmail.com
2022-03-13 18:37:10 +00:00
riastradh 98755d3579 kern: Fix fencepost error in ts2timo overflow checks.
Triggered by

clock_settime({.tv_sec=0, .tv_nsec=0})
clock_nanosleep({.tv_sec=LLONG_MIN, .tv_nsec=0})

so that, by the time we enter ts2timo (after a few nanoseconds have
passed), we end up with

tsd = {.tv_sec=0, .tv_nsec=nonzero}
ts = {.tv_sec=LLONG_MIN, .tv_nsec=0}

and the subtraction ts - tsd leads to a borrow from tv_sec.

Reported-by: syzbot+14818113e9d0b45bca64@syzkaller.appspotmail.com
2022-03-13 17:52:45 +00:00
andvar 2532bf9bb5 s/hander/handler/ and s/hader/header/ in comments and documentation. 2022-03-13 17:50:54 +00:00
riastradh 9ab52bf871 kern: Fix ordering of loads for pid_table and pid_tbl_mask.
This introduces a load-acquire where there was none before.  This is
a simple correctness change.  We could avoid the load-acquire, and
use only load-consume, if we used a pointer indirection for _both_
pid_table and pid_tbl_mask.  Takes a little more work, and probably
costs an additional cache line of memory traffic, but might be worth
it to avoid the load-acquire for pid lookup.

Reported-by: syzbot+c49e405d0b977aeed663@syzkaller.appspotmail.com
Reported-by: syzbot+1c88ee7086f93607cea1@syzkaller.appspotmail.com
Reported-by: syzbot+da4e9ed1319b75fe2ef3@syzkaller.appspotmail.com
2022-03-13 17:21:29 +00:00
rillig 2e6995096b lint: add braces around multi-line loop body
No functional change.
2022-03-13 15:26:54 +00:00
taca 6d2501cedc ISC DHCP 4.4.3 released. 2022-03-13 15:23:38 +00:00
rillig a661a10289 lint: clean up comments, explain assertion in inssym 2022-03-13 15:20:50 +00:00
rillig 25651e882e lint: use an unsigned counter for temporary variable names
No functional change.
2022-03-13 15:17:08 +00:00
rillig fb81512c26 lint: improve debug logging for the symbol table
Only print the heading for the symbol table level if there is actually a
symbol on that level.

Ensure that no symbol with block level -1 is ever in the symbol table
(see rmsym).
2022-03-13 15:08:41 +00:00
rillig f22a14729a lint: fix off-by-one error in symbol table
No functional change since the error was in the "safe" direction.
2022-03-13 14:49:18 +00:00