1
0
mirror of https://github.com/openbsd/src.git synced 2024-12-22 07:27:59 -08:00
Commit Graph

237197 Commits

Author SHA1 Message Date
tb
7598353d73 tcpdump: fix an off-by-one so that this can also print gwid
ok denis
2024-12-18 06:33:25 +00:00
jsg
633da3e108 kength -> length 2024-12-18 04:15:48 +00:00
dlg
e541a7ae0c go back to r1.326, before i fiddled with packet generation and bpf.
i've had a couple of reports of redundant firewalls misbehaving
since these changes, so until i can figure out what's wrong i'm
backing them out.

reported by hrvoje popovski and mark patruck
2024-12-18 02:25:30 +00:00
dlg
2fbde403af let LLDP packets fall through to being handled on the port interfaces.
802.1ax says that LLDP packets sent to the multicast groups listed
in 802.1ab (the lldp spec) should be treated as "control frames"
so they can be processed by an lldp agent on physical interface.

in our situation that means we shouldn't aggregate LLDP packets so
they appear to enter the system on aggr(4) interfaces, we should
let the physical port interfaces handle them. this will allow
AF_FRAME sockets listening on aggr port interfaces receive lldp
packets.

jmatthew@ says it looks good.
2024-12-18 01:56:05 +00:00
deraadt
2d9a425ef9 sync 2024-12-17 20:38:22 +00:00
schwarze
f5255f98a5 New manual page EVP_aes_128_gcm(3).
The main benefit is moving the cumbersome and error-prone method of
using EVP_EncryptInit(3) for AES-GCM out of the important, but obese
manual page EVP_EncryptInit(3), and to create a logical place for
pointing readers to the safer and more flexible EVP_AEAD_CTX_init(3).

As a side benefit, document three control commands that were so far
undocumented and make the description of three others more precise.

Feedback and OK tb@.
2024-12-17 18:11:44 +00:00
beck
9ee6f1fe20 Avoid a reduce once that can cause Clang misoptomization.
Some versions of Clang compile this to non-constant time
code. The fix is adapted from boring. For full details see:
https://boringssl-review.googlesource.com/c/boringssl/+/74447

ok tb@
2024-12-17 17:06:10 +00:00
claudio
0c9ac8635e Mark processes that are stopped because of a ptrace trap as PS_TRAPPED.
Use this flag instead of ps_single in dowait6() to decide if a process
was stopped because of a ptrace event.
OK mpi@
2024-12-17 14:45:00 +00:00
jca
395f60ac68 sync 2024-12-17 13:24:04 +00:00
jca
03fc72bb76 Install riscv_vector.h
Used at least by ports/news/nzbget

ok kettenis@
2024-12-17 13:22:38 +00:00
nicm
5df986e2a2 Assign excess space more evenly when spreading out cells, from Torbjorn
Lonnemark.
2024-12-17 08:40:24 +00:00
tb
95be67e7d5 Close fp before exit since we clean up other stuff
From Kenjiro Nakayama
2024-12-17 07:20:10 +00:00
tb
c07f1519ba Plug leak coming from debug leftover
There's still CBS holding data in here. Yuck.
2024-12-17 07:19:10 +00:00
tb
516824a334 Plug two memory leaks in MLKEM*_generate_key_external_entropy()
This needs more thinking. These are void functions that allocate...
Left an XXX for now.

From Kenjiro Nakayama
2024-12-17 07:13:47 +00:00
tb
bee138d50b mlkem: clean up top matter in headers 2024-12-17 06:43:32 +00:00
stsp
0cb476ce62 actually enable vlan tagging offload on ice(4) interfaces
Patch by brad, tested by me on E810
2024-12-17 05:32:31 +00:00
deraadt
18efafee57 sync 2024-12-16 23:27:58 +00:00
jmc
825a12c4e5 rewrite a sentence, add a width specifier to a list, and some "a" -> "an";
ok dlg
2024-12-16 21:39:29 +00:00
mvs
098ff4accc Unlock sysctl_video().
This sysctl(2) path contains only `video_record_enable', which is
atomically accessed boolean integer.

ok kirill mglocker
2024-12-16 21:22:51 +00:00
claudio
86da87d93e Bump version 2024-12-16 16:14:46 +00:00
claudio
b3b12989e0 Adjust enum msg_type since they are now prefixed.
OK tb@ millert@ deraadt@
2024-12-16 16:10:46 +00:00
claudio
0d4ceb4100 Prefix enum msg_type with MSG_ to prevent a duplicate symbol warning
for NOTIFICATION (which is also used in parse.y as token).
OK tb@ millert@ deraadt@
2024-12-16 16:10:10 +00:00
tb
39b34cbdda Determine the expiration date also for TA certs
Avoids an incorrect "Signature path expired" for such certs.

noticed by and ok job
2024-12-16 13:53:37 +00:00
nicm
926caf46e6 Add a nesting limit to source-file, from Fadi Afani in GitHub issue
4223.
2024-12-16 09:13:09 +00:00
nicm
be3910bdd6 Memory leak, GitHub issue 4298. 2024-12-16 08:54:34 +00:00
nicm
f2412267dc Missing main-vertical-mirrored from layout list, from charlotte at
lottia dot net.
2024-12-16 08:51:41 +00:00
tb
f88109403c Simplify ec_point_to_octets()
This had an extra dance to allow a NULL output buffer. The plan was to
use this in i2o_ECPublicKey() to preserve the behavior of avoiding an
allocation if out == NULL. However, when I rewrote the latter I punted
on preserving that complication, as it was already batshit crazy enough.

Thus, remove said dance and make ec_point_to_octets() cleaner.

ok jsing
2024-12-16 06:11:26 +00:00
denis
f4b7e39cf3 Add a missing AF description.
Previously the wrong description was returned if address family number was greater than 16.

OK tb
2024-12-15 21:37:11 +00:00
tb
1f50142272 Fix copy-paste error 2024-12-15 19:42:33 +00:00
tb
851f546489 Only warn about pruning VRPs if there's anything to prune
ok job
2024-12-15 19:40:07 +00:00
mvs
0a76646535 Unlock KERN_GLOBAL_PTRACE. `global_ptrace' is atomically accessed
boolean integer. Only ptrace_ctrl() loads it once outside sysctl(2)
layer.

ok mpi
2024-12-15 18:25:12 +00:00
mvs
82fe8fc4fe Make `video_filtops' mp-safe.
Replace selinfo data with klist. Introduce `sc_mtx' mutex(9) to protect
`sc_frames_data' and `sc_rklist'.

Additionally tested by Laurence Tratt.

ok kirill mglocker
2024-12-15 18:23:56 +00:00
dlg
f77c65ef0a add a manpage for AF_FRAME and how to use Ethernet dgram sockets. 2024-12-15 11:07:08 +00:00
mpi
f46a341eee Return errno values rather than dying VM_PAGER_* in the pgo_fault() interfaces.
This doesn't introduce any value change.  All errors are converted to EACCES
even if many could use EIO.

ok tb@, jsg@
2024-12-15 11:02:59 +00:00
dlg
6fb93e4770 add an AF_FRAME socket domain and an IFT_ETHER protocol family under it.
this allows userland to use sockets to send and receive Ethernet
frames. as per the upcoming frame.4 man page:

     frame protocol family sockets are designed as an alternative to bpf(4)
     for handling low data and packet rate communication protocols.  Rather
     than filtering every frame entering the system before the network stack
     like bpf(4), the frame protocol family processing avoids this overhead by
     running after the built in protocol handlers in the kernel.  For this
     reason, it is not possible to handle IPv4 or IPv6 packets with frame
     protocol sockets because the kernel network stack consumes them before
     the receive handling for frame sockets is run.

if you've used udp sockets then these should feel much the same.

my main motivation is to implement an lldp agent in userland, but
without having to have bpf look at every packet when lldp happens
every minute or two.

the only feedback i had was positive, so i'm putting it in
ok claudio@
2024-12-15 11:00:05 +00:00
denis
5bfef6125a Fix wrong token name
OK claudio@
2024-12-14 21:24:31 +00:00
tb
7266ec7026 Stop reaching into libcrypto/bytestring 2024-12-14 19:19:38 +00:00
tb
d4ed7533f1 Normalize top of files
RCS marker, KNF for comment, fix and sort includes as usual.
2024-12-14 19:16:24 +00:00
mvs
3e142e7fa6 Unlock KERN_WXABORT.
`uvm_wxabort' is atomically accessed boolean integer. uvm_wxcheck()
already loads it lockless.

ok mpi
2024-12-14 12:07:38 +00:00
kirill
40dad511e1 regen 2024-12-14 10:04:51 +00:00
kirill
854ac53823 sys/usbdevs: remove unused Jabra PanaCast 20
OK mglocker@ kn@
2024-12-14 10:02:47 +00:00
kirill
e8f231c9fb sys/uvideo: remove quirk UVIDEO_FLAG_RENEGOTIATE_AFTER_SET_ALT
This quirk was introduced as a workaround, not the fix for the real
issue. The root cause was fixed in the previous commit (v1.227) to
uvide.c with skip uvideo_vs_set_alt for bulk endpoint.

OK mglocker@ kn@
2024-12-14 09:58:04 +00:00
claudio
2364114a54 bgpctl bits for RFC 8358 (Graceful notification) support
OK tb@
2024-12-13 19:22:01 +00:00
claudio
6c15f94398 Implement RFC 8538: Notification Message Support for BGP Graceful Restart
This is an extension to graceful restart and requires graceful restart to
be enabled to work. The NOTIFICATION bits are implemented as specified but
a much more strict stand was taken as to when send a graceful reset.

bgpd only sends graceful notifications for a few cease cases (same as in
the RFC) and for the holdtimer and sendholdtimer errors. Everything else
is a hard error because the other side is not trustworthy.

OK tb@
2024-12-13 19:21:03 +00:00
tb
7777ed9e1c sync 2024-12-13 05:57:41 +00:00
beck
08c63c712f Add ML-KEM 1024 from BoringSSL
Changes include conversion from C++, basic KNF, then adaptation to
use our sha3 functions for sha3 and shake instead of the BorinSSL
version. This Adds units tests to run against BoringSSL and NIST test
vectors.

The future public API is the same as Boring's - but is not yet exposed
pending making bytestring.h public (which will happen separately) and
a minor bump

Currently this will just ensure we build and run regress.

ok tb@ to get it into the tree and massage from there.
2024-12-13 00:17:17 +00:00
beck
267e7b7d19 KNF nit tb wanted me to fix 2024-12-13 00:09:02 +00:00
beck
75c083a031 Add ML-KEM 768 from BoringSSL
Changes include conversion from C++, basic KNF, then adaptation to
use our sha3 functions for sha3 and shake instead of the BorinSSL
version. This Adds units tests to run against BoringSSL and NIST test
vectors.

The future public API is the same as Boring's - but is not yet exposed
pending making bytesring.h public (which will happen separately) and
a minor bump

Currently this will just ensure we build and run regress.

ok tb@ to get it into the tree and massage from there.
2024-12-13 00:03:57 +00:00
claudio
442a03204b Cache the Adj-RIB-Out for sessions that have not been down for more than
INTERVAL_SESSION_DOWN (3600) seconds.

Rebuilding the Adj-RIB-Out is a lot of work while keeping the RIB in sync
is reasonably trivial. So avoid the work for the case that a session
was just quickly reset. This only works if the same peer settings are
used in the old and new session.

For this introduce a IMSG_SESSION_DELETE that tells the RDE to remove the
peer and split peer_down into a part that takes the session down (and
clears the Adj-RIB-In) and a part the frees the peer (peer_delete).
The SE now sends an IMSG_SESSION_ADD command on first connect and skips
that imsg on later connects unless IMSG_SESSION_DELETE was called before.
During config reload the IMSG_SESSION_ADD calls only need to happen when
the RDE actually has that information.

OK tb@
2024-12-12 20:19:03 +00:00
pascal
7c9b6f9dcf Do not hardcode the CRL lifetime for "ikectl revoke" to 365 days. This value
is supposed to be configurable via ikeca.cnf.

ok tobhe@, "probably ok" sthen@
2024-12-12 17:29:33 +00:00