1
0
mirror of https://github.com/openbsd/src.git synced 2026-06-18 07:13:36 +02:00
Commit Graph

245115 Commits

Author SHA1 Message Date
mvs 4baec750da Drop unused 'struct proc' argument from msg_copyin() and msg_copyout().
ok claudio
2026-06-15 13:41:47 +00:00
mvs 2c78b5fefe Make functions arguments list to be newer than K&R. Otherwise modern
Clang compiler produces warnings.

ok claudio
2026-06-15 13:40:41 +00:00
nicm f0c49bac36 Tidy up screen_redraw_get_visible_ranges by using a couple of
temporaries for start and end of range.
2026-06-15 12:07:49 +00:00
nicm e0d0f3a7d2 Use correct x position when drawing clipped line. 2026-06-15 11:45:51 +00:00
kirill 4bc4a388a4 sys/sparc64: accept ide nodes in IDE bootpaths
OpenBIOS reports QEMU IDE disks with an intermediate ide node, while the
sparc64 bootpath code only treats ata as a channel node.

The disk is attached as wd0, but the final disk component is not nailed
as the boot device, so the kernel asks for the root device.

No QEMU level option seems possible to enforce ata disk.

OK: claudio@
2026-06-15 11:35:19 +00:00
rsadowski 78600f9306 relayd: knfmt, no functional change
OK tb
2026-06-15 11:02:13 +00:00
jsg 81bb5dc40f fix indentation in local version of amdgpu_gem_fault() 2026-06-15 10:36:51 +00:00
nicm c8249f6768 Add -B to new-pane to select the floating pane border. 2026-06-15 09:21:40 +00:00
job 320aa6b0a9 Clear last_modified after each response on a persistent HTTP connection
(In case a later response doesn't contain its own "Last-Modified" header field.)

Reported by Ties de Kock.

OK tb@ claudio@
2026-06-15 09:20:21 +00:00
kevlo bff906b101 Add missing break
ok claudio@
2026-06-15 08:53:14 +00:00
nicm e258f212aa Add top-floating and bottom-floating to pane-border-status to show
status line only on floating panes.
2026-06-15 08:16:05 +00:00
nicm e015fbd1ed When redrawing a whole pane line, fall into tty_draw_line for any
characters that are not plain ASCII. Fixes redraw issues with partial
tabs and other wide characters when a pane is partly outside the window.
2026-06-15 07:40:45 +00:00
djm 955cfc7c55 use different strategy to check whether keys are present or absent
in the agent; helps some -portable tests on platforms that have
stupid grep(1)
2026-06-15 06:36:52 +00:00
jsg 632f324b7c more closely match how linux maps vram on xgmi parts
map cacheable not wc for xgmi parts connected to cpu on x86
don't try to map vram if there isn't any
2026-06-15 06:30:58 +00:00
djm f1a14588cf avoid use of paste(1); helps portable 2026-06-15 06:24:20 +00:00
jsg fc4a1b0d90 call amdgpu_xcp_dev_register() and amdgpu_amdkfd_drm_client_create()
in amdgpu_attachhook(), matching amdgpu_pci_probe()

CONFIG_HSA_AMD / amdkfd remains disabled
2026-06-15 02:46:12 +00:00
djm e83fdb4948 fix multiple problems with testing hostkey types that are
not enabled by default.

1) Add all hostkey types in the "multiple hostkeys" subtest.
   Previously known_hosts was accidentally clobbered, causing
   only the last added hostkey type to be used.
2) Explicitly enable the hostkey types under test via
   HostKeyAlgorithms
2026-06-15 01:55:44 +00:00
jsg be4ef8762b move drm_dev_register() call to before connector test and check return 2026-06-15 01:52:53 +00:00
jsg 385b42751a call amdgpu_init_debug_options() in amdgpu_attachhook()
matches the call in amdgpu_pci_probe()
2026-06-15 01:30:51 +00:00
nicm 82a9e4d18b Fix various errors in redrawing:
- Fix the active pane colour when only two panes and scrollbars enabled.

- Clip left and right scrollbars the same for floating panes.

- Do not subtract scrollbar width twice when working out width of status
  line.

- Check if a character is inside a visible range correctly (do not
  include the next position outside the range).
2026-06-14 20:53:20 +00:00
nicm 44534912ef Skip floating panes when working out the top or bottom cell. Fixes
missing bottom status pane status line when floating panes exist.
2026-06-14 20:37:57 +00:00
nicm 70f06a5829 Add a helper to get pane-border-status for a window for some other
changes to come.
2026-06-14 19:31:37 +00:00
nicm 3f5cf1464b Take account of borders when resizing floating panes. 2026-06-14 18:59:15 +00:00
jsing 3dc2c2828b Correct secondary key share handling for HelloRetryRequests.
With the introduction of a secondary key share, we fail to ensure that the
HelloRetryRequest does not specify the group that was used for the
secondary key share. We also fail to free the secondary key share early in
this case, meaning that it lingers in memory until the SSL is reset or
freed. Fix both of these issues.

ok tb@
2026-06-14 15:51:17 +00:00
jsing 20117dcb7f Improve TLSv1.3 server handling of no shared groups.
While we currently correctly handle the no-shared-group case, it currently
fails late when we try to create the key share. Improve detection and
handling so that we fail sooner and send an alert to the client when
processing client key shares.

While here rename preferred_group_found to shared_group_found - we look for
the client preferred group, but any group that we select will always be in
the client list (even if it's the last one).

Reported by the tlspuffin team.

ok tb@
2026-06-14 15:47:49 +00:00
jsing aca74d656c Send illegal parameter alerts for various HelloRetryRequest violations.
Be more RFC compliant and send illegal parameter alerts when the client
receives a HelloRetryRequest that requests a group that we did not offer
or a group that we sent a key share for in the ClientHello. These were
annotated as missing, but not previously implemented.

Prompted by a report from the tlspuffin team.

ok tb@
2026-06-14 14:53:07 +00:00
jsing 9fa1dce37a Improve renegotation regress.
Include coverage of Renegotiation Indication and legacy connection
handling.
2026-06-14 14:33:36 +00:00
jsing d5512f45c6 Mop up SSL_CTX_set_options(3).
SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS is now a no-op, tidy up
SSL_OP_LEGACY_SERVER_CONNECT and reflect the current state of SSL_OP_ALL
Delete the entire "SECURE RENEGOTIATION" section that contained ancient
ramblings.

ok beck@ tb@
2026-06-14 14:30:52 +00:00
jsing 969f618254 Remove SSL_OP_LEGACY_SERVER_CONNECT from default options.
Remove SSL_OP_LEGACY_SERVER_CONNECT from the default SSL options and the
SSL_OP_ALL define. This means that we will now refuse to connect to a
TLSv1.2 server if it does not support the Renegotiation Indication (RI)
extension. This prevents a class of attacks against TLS clients that are
talking to TLSv1.2-only servers that permit client initiated renegotiation.

Raised by Lucca Hirschi et al from Inria.

ok beck@ tb@
2026-06-14 14:25:55 +00:00
semarie 009b3423c5 cargo-module.5: document more variables
From Andrew Kloet andrew kloet.net
2026-06-14 14:02:44 +00:00
rsadowski 459bfe6c89 relayd: drain OpenSSL error queue on TLS failures
Borrowed from smtpd. Without draining we just log "RSA_meth_dup failed"
and lose the actual reason.

Wire ssl_error() into ca_engine_init(), which also kills a dead
RSA_meth_free() on a NULL pointer there, and into ssl_load_key()s fail
path.

Tweaks and OK tb
2026-06-14 08:57:43 +00:00
rsadowski 67a094f58b relayd: remove from and toptr to simplify
feedback and OK claudio
2026-06-14 08:55:54 +00:00
rsadowski 6ef9a49ecd relayd: use ibuf_get_string() and ibuf_get_data() to read imsg payloads
Drop the local get_string() and read variable-length string and binary
payloads through the ibuf getters instead of the raw imsg->data pointer.

ibuf_get_string() no longer trims the input at the first non-printable
byte like the old get_string() did; the payloads come from the parent
over privsep imsg.

idea and ok claudio
2026-06-14 08:54:21 +00:00
rsadowski 7b68501be4 fix knfmt 2026-06-14 08:53:06 +00:00
rsadowski c9b5e05e3c Check error in proc_forward_imsg 2026-06-14 08:52:16 +00:00
rsadowski a4156c64cb relayd: read parent_dispatch_pfe() payloads via the imsg getters
Use imsg_get_data() for the fixed-size messages and imsg_get_ibuf() for
the variable-length IMSG_CTL_RELOAD path, taking the config name from
the ibuf via ibuf_data()/ibuf_size().

Remove IMSG_SIZE_CHECK and IMSG_DATA_SIZE, no consumer left.


OK claudio
2026-06-14 08:51:11 +00:00
rsadowski a1a35aaebe relayd: use imsg_get_ibuf() for variable-length CA key operations
The IMSG_CA_PRIVENC/PRIVDEC messages carry a ctl_keyop header followed
by cko_flen (request) or cko_tlen (response) trailing bytes, so the
exact-size imsg_get_data() cannot be used. Read the header with
imsg_get_ibuf() + ibuf_get() and take the payload from the same ibuf
via ibuf_data()/ibuf_size().

Tweaks (in a different commit) and OK claudio
2026-06-14 08:50:26 +00:00
rsadowski 93e9ebaeef relayd: read imsg payloads via the new imsg/ibuf getters
Convert the config_get* handlers from IMSG_SIZE_CHECK() + memcpy() to
the new imsg API. Fixed-size payloads use imsg_get_data(). Functions
with a fixed header followed by variable-length data use imsg_get_ibuf()
+ ibuf_get() and read the remainder from the same ibuf cursor, since
imsg_get_data() requires the payload to match the requested size
exactly.

Feedback and OK claudio
2026-06-14 08:48:04 +00:00
nicm 8d8c88272e Return early if connect construct cell, reported by Jere Viikari. 2026-06-14 08:47:44 +00:00
rsadowski 01021ef022 relayd: convert control imsg forwarding to imsg_forward()
Rework control_imsg_forward() to forward the message unaltered via
imsg_forward() instead of rebuilding it with imsg_compose_event().

read the type via imsg_get_type(), dropping the manual header-length
Switch to use read the payload with imsg_get_data() and checks and the
memcpy() that wrote the data back into the imsg before forwarding.

OK claudio
2026-06-14 08:45:02 +00:00
rsadowski c3b31b8270 relayd: use imsg_get_data() and imsg_get_type()
Replace IMSG_SIZE_CHECK() + memcpy()/bcopy() with imsg_get_data(),
which does the length check and copy in one call, and read the message
type via imsg_get_type() instead of imsg->hdr.type.

OK claudio
2026-06-14 08:41:08 +00:00
rsadowski 2f0a999569 relayd: convert proc.c to new imsg API
Replace IMSG_SIZE_CHECK() + memcpy() with imsg_get_data(), which does
the length check and copy in one call. Use the imsg accessors
(imsg_get_*) instead of touching imsg.hdr directly and
imsgbuf_get()/imsgbuf_read() instead of imsg_get().

Rewrite proc_forward_imsg() to use imsg_forward() per target imsgbuf
instead of re-composing via proc_compose_imsg(); arm the write event
with imsg_event_add() after each forward.

proc_forward_imsg() never forwarded an fd, and imsg_forward() rewinds
the buffer internally, so multiple forwards per message keep working.

Drop the now-unused n parameter (all callers passed -1).

ok claudio@
2026-06-14 08:37:00 +00:00
mvs 076e2b1c1f sppp_pap_input(): do not compare credentials if the lengths of received
ones is not the same of configured.

ok renaud bluhm
2026-06-14 05:39:23 +00:00
djm 9cbb3b0bd2 make crypto_sign_ed25519_keypair_from_seed non-static. The
new ML-DSA/ed25519 code needs it
2026-06-14 04:16:19 +00:00
djm 6f9c45541f unit and regression tests for composite PQ ML-DSA44/Ed25519
keys.

Includes a new unittests/crypto test that tests basic functionality
of the underlying crypto primitives against public test vectors
2026-06-14 04:08:05 +00:00
djm 831e2e1785 Add experimental support for a composite post-quantum signature
scheme that combines ML-DSA 44 and Ed25519 using the construction
specified in draft-ietf-lamps-pq-composite-sigs. There's also an
early draft documenting use of the integration of this scheme into
SSH as draft-miller-sshm-mldsa44-ed25519-composite-sigs

This scheme is not enabled by default. To you use, you'll need
to add it to HostKeyAlgorithms, PubkeyAcceptedAlgorithms, etc.
Keys may be generated using "ssh-keygen -t mldsa44-ed25519".

The ML-DSA implementation comes from libcrux. Thanks to
Jonas Schneider-Bensch and Jonathan Protzenko for their work to
make this available.

Consensus is that it's time to get this in to allow people to
experiment with it.

feedback markus@ tb@ logan@ deraadt@
2026-06-14 03:59:34 +00:00
nicm 7f3d25a7c2 With mode-keys vi, keep cursor in the same position relative to the text
when scrolling. GitHub issue 5216 from Arseniy Simonov.
2026-06-13 20:39:11 +00:00
nicm 46410a2bd4 Add some missing const, from Jere Viikari. 2026-06-13 20:07:30 +00:00
nicm cf95c7767d Skip floating cells when moving to previous cell for resize of tiled cells. 2026-06-13 20:03:10 +00:00
nicm 5e36418eb2 Make the resize keys always change right and bottom borders for floating
panes which is more intuitive.
2026-06-13 19:57:44 +00:00