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

245158 Commits

Author SHA1 Message Date
deraadt 739c9ad20a oops 2026-06-04 07:37:21 +00:00
deraadt c7a21344ea smtpd was already fork+exec privsep, and starts 6 copies which are
the same binary.
I first decided to random-relink smtpd because of some recent close
calls (in the IPC codepaths, which could have played part in lateral
movement following a primary hole).  Then it dawned on me that I can
random relink each of the privsep binaries to be unique, in the same
style as sshd.
Each binary now contains a lot of code it does not need (and is not
reached, but the code remains).  That can be refactored as a later
step.
The new /etc/rc relink code will automaticall pick these up.
vague approval martijn, gilles, millert
2026-06-04 05:42:58 +00:00
deraadt 19b3b9e8a9 httpd worries me a bit, so I want to random-relink it at boot.
The new /etc/rc relinking components will automatically pick up this
new directory and process it.
2026-06-04 05:34:53 +00:00
deraadt bd3e85e0af Handle the randomly placed direct map
ok mlarkin
2026-06-04 05:25:04 +00:00
mlarkin a36bbdd351 amd64: Place the direct map at a random location
Places the direct map at a 512GB-aligned random location selected from
a 16TB VA window.

With help and suggestions from deraadt@. Tested by many.
2026-06-04 05:22:04 +00:00
djm db737e6588 add signature malleability and pubkey validity checks to ed25519
verification (SSH doesn't depend on these properties)
Pointed out by Soatok Dreamseeker

Add an explicit-seed variant of the keygen function.

feedback / "looks fine" tb@
2026-06-04 04:26:51 +00:00
nicm f44641bf06 Change run-shell expansion to just be #{1} etc not #1 which interferes
with colours.
2026-06-03 20:18:49 +00:00
nicm eaf7740aa5 Change so panes scroll when the cursor is at the top instead of halfway
down, from Michael Grant.
2026-06-03 20:16:14 +00:00
kirill e8e5aa2db9 relayd: strip Content-Length for chunked messages
RFC 9112 section 6.1 requires an intermediary that forwards a message
carrying Transfer-Encoding to remove any received Content-Length first.
relayd already parses the body as chunked in this case, but previously
left Content-Length in the header tree, so the backend could receive
both framing fields and choose a different message boundary.

When chunked framing is selected, remove Content-Length before header
emission; this preserves relayd's chunked body handling while avoiding
CL.TE ambiguity downstream.

Reproted by: Stuart Thomas

OK: rsaodwski@
2026-06-03 20:00:34 +00:00
kirill fc4fdcb5aa httpd: reject CL.TE request framing
RFC 9112 sections 6.1 and 6.3 identify a request containing both
Transfer-Encoding and Content-Length as ambiguous request smuggling
input. httpd is the origin server, not an intermediary, so it should not
rewrite the message and continue processing it.

Reject chunked requests that also carry Content-Length before method
specific body handling or FastCGI parameter generation; this avoids
exposing inconsistent framing metadata to applications.

Reproted by: Stuart Thomas

OK: rsaodwski@
2026-06-03 20:00:07 +00:00
rsadowski 690673315b relayd: reject obs-fold to prevent parser differentials (RFC 9112 5.2)
Replace silent kv_extend normalisation with an unconditional reject.
RFC 9112 5.2 permits rejection; it is safer than SP replacement
for a forwarding proxy and handles both request and response direction.
kv_extend is therefore no longer required.

Reported by Stuart Thomas, OK kirill@
2026-06-03 19:26:56 +00:00
rsadowski 7aef7fa9fa httpd: reject obs-fold with 400 (RFC 9112 5.2)
Replace silent kv_extend normalisation with an unconditional 400.
RFC 9112 5.2 explicitly permits rejection; it is the safer choice
over SP replacement, which hides parser ambiguity downstream.

Reported by Stuart Thomas, OK kirill@
2026-06-03 19:25:06 +00:00
claudio ff25f26aa1 Fixup regress after chaning the default for 'announce as-4byte' to enforce.
Friendly reminder that I forgot to commit this by anton@
2026-06-03 19:21:45 +00:00
claudio f20971e9ad Set MT_HW_EMI_CTL_SLPPROT_EN on 7925 in mwx_attach and then do a
WF sys reset.

From kevlo@
VS: ----------------------------------------------------------------------
2026-06-03 15:11:50 +00:00
claudio e8fd505e1d In mwx_attach() do the powermanagement dance earlier and also check
for MT7920 that come with a 7921 PCI id.

From kevlo@
2026-06-03 11:48:57 +00:00
claudio 7052455c5f Cleanup prototypes. 2026-06-03 11:38:02 +00:00
claudio c691d17796 Adjust mwx_mcu_rx_event() to work on both connac2 and connac3 devices.
Tested on 7921 and 7925
2026-06-03 11:22:50 +00:00
stsp 12c5af5401 Fix roaming between APs with qwx(4).
Implement a custom bgscan_done() handler which waits for Tx queues to
drain and handles the AP switch properly by disassociating the device
from our old AP while we still have the old AP's MAC address available
in ic_bss.

Previously, the qwx_newstate task would run a firmware disassociation
sequence with the _new_ AP's MAC address before trying to associate.
The firmware didn't like this and we ran into errors such as:

 qwx0: delete key 3 failed: error 58
 qwx0: failed to delete peer vdev_id 0 addr xx:xx:xx:xx:xx:xx ret 58
 qwx0: unable to delete BSS peer: 58

tested by ajacoutot@ and myself on amd64, and by phessler@ on arm64

ok phessler@, "it works great" ajacoutot@
2026-06-03 06:59:51 +00:00
stsp c10cdd9a9c always allow data frame interrupts in qwx(4) while the interface is UP
This helps with situations where we would fail to receive the initial
EAPOL frame during WPA handshakes with the AP, in particular when
roaming between APs.

tested by ajacoutot@ and myself on amd64, and by phessler@ on arm64
2026-06-03 06:57:42 +00:00
jsg bd33c15156 correct mdoc usage 2026-06-03 06:10:06 +00:00
jsg daa1052c00 speficfication -> specification 2026-06-03 05:59:45 +00:00
deraadt 0e8966f848 impossible __tmpfd(2) is gone 2026-06-03 03:07:10 +00:00
deraadt 55854d3f06 sync 2026-06-02 21:46:41 +00:00
deraadt 4cdeefe0d4 Delete __tmpfd(2) which is not used. There was no libc stub, so no
pinsyscalls table entry is ever created, so a pecululiar flaw in this
subsystem wasn't reachable.
ok millert kettenis
2026-06-02 21:46:21 +00:00
kirill cf839b82e3 sys/uvideo: fix UVIDEO_FLAG_VENDOR_CLASS attach
UVIDEO_FLAG_VENDOR_CLASS has been broken since r1.147: attach selected
only UICLASS_VIDEO interfaces, even after match accepted a device whose
video control interface incorrectly reports UICLASS_VENDOR.

Restore the vendor class path in attach, and add the remaining Logitech
vendor class UVC devices listed by Linux for which usbdevs already has
product IDs.

Issue reported and tested by "requiem." on Logitech QuickCam Pro5000

OK: mglocker@
2026-06-02 20:33:29 +00:00
nicm f213fe822a Use new layout functions for join-pane also, from Dane Jensen. 2026-06-02 19:31:36 +00:00
nicm 50c4b0fbd8 Move cell creation into layout.c, from Dane Jensen. 2026-06-02 19:25:06 +00:00
naddy 6325c72c3e one OpenBSD CVS keyword per file is enough
ok jsing@
2026-06-02 15:18:16 +00:00
claudio 5d7753930b Implememnt mwx_reg_addr() for both 7921 and 7925
Also implement the L1 reg access for 7921 and 7925.

Based on a diff from kevlo@
2026-06-02 14:23:47 +00:00
claudio d58ca09763 Missing change in mwx_wfsys_reset, set the bit in the right place. 2026-06-02 13:20:28 +00:00
claudio 0e0beefaf9 Add extra tab in prototypes.
From kevlo@
2026-06-02 12:18:13 +00:00
claudio 4b5e9f6f97 Another rename, mwx_dma_disable and mwx_wfsys_reset are used by all versions.
From kevlo@
2026-06-02 11:55:57 +00:00
claudio 2c725e28ea Probe and detect all possible mwx(4) variants that mwx(4) will cover.
This is MT7920, MT7921, MT7922 and MT7925.
From a diff shared by kevlo@
2026-06-02 11:10:57 +00:00
claudio b780355627 mcu_fw_pmctrl and mcu_drv_pmctrl are the same on all mwx(4) versions.
Rename the functions to mwx_mcu_*_pmctrl.

from kevlo@
2026-06-02 11:02:10 +00:00
kettenis d620432c9d Improve checking of ELF notes. This adds checks for overflow when rounding
sizes up to be a multiple of the ELF word size and adds checks to prevent
out of bounds access.

Based on a report and diff from Andrew Griffiths.
ok jsg@, deraadt@
2026-06-02 09:45:08 +00:00
claudio 3e0a91e6cd Regen 2026-06-02 09:19:54 +00:00
claudio ed77d67388 Add a few more MediaTek ids that will be handled by mwx(4) eventually.
OK kevlo@
2026-06-02 09:19:16 +00:00
claudio 7760f069d9 Default 'announce as-4byte' to 'enforce' for all peers
After close to 20 years of 4-byte AS support in bgpd it is time to enforce
it. The fall back code from 2-byte AS to 4-byte AS is non-trivial and
the RFC is way to optimistic and ignores many possible error conditions.

All relevant BGP implementations support 4-byte ASnums so it is a
misconfiguration to not use this by default. Most implementations do this
by default.

In the unlikely cases where 2-byte AS support is still needed one can
fall back to the previous default by using 'announce as-4byte yes'.

OK tb@ job@
2026-06-02 08:40:02 +00:00
claudio f2b4372d50 Reimplement aspath_merge() in a more cynical fashion
Mergin AS4_PATH into ASPATH can be done a bit simpler by using the fact
that AS4_PATH must be a subset of ASPATH. The resulting path has the same
size and layout as the ASPATH. bgpd inflates the 2-byte ASPATH to 4-byte
representation early on so this simplifies the merge.

When mering the path be strict and any difference in the two paths triggers
a treat-as-withdraw error. Something is off so refuse to work with this path.
This is harsher than RFC 6793 but the concerns then no longer matter.

Use ibuf for all the buffers to have memory safety during this merge operation.

OK tb@
2026-06-02 08:23:56 +00:00
nicm ccde0b7b83 Move the PANE_FLOATING flag into the layout cell and add an accessor.
From Dane Jensen.
2026-06-02 08:13:50 +00:00
jca a155b5b0a4 Prevent daily(8) from deleting /tmp/run/user/* direct subdirectories
These are directories that are created by
setusercontext(LOGIN_SETXDGENV) and should be available as long as
a session with the XDG_RUNTIME_DIR env variable pointing at them exists.
Since we don't track such sessions, we can't have daily(8) remove such
directories blindly. This looks like an oversight in the initial commit.

Diff proposed by dah4ae (at) posteo (dot) de, ok ajacoutot@
2026-06-02 07:17:35 +00:00
nicm c532acead7 Fix border colour bug in the floating panes branch where inactive
floating pane borders incorrectly use the active colour at intersections
with tiled pane borders. From Michael Grant.
2026-06-02 07:11:49 +00:00
djm 825a208331 refer to RFC9987 instead of I-D 2026-06-02 06:18:27 +00:00
jsg de15ecd0c7 drm/i915/dp: Fix readback for target_rr in Adaptive Sync SDP
From Ankit Nautiyal
ad8e3d096fa1e2f8b1009731c6e0cdae7ebedf79 in linux-6.18.y/6.18.34
f87abd0c6604fb6cc31cc86fc7ccc6a576924352 in mainline linux
2026-06-02 03:50:47 +00:00
jsg 98fac70f84 drm/amd/display: Validate payload length and link_index in dc_process_dmub_aux_transfer_async
From Harry Wentland
1ecde19bfce6535bffddad1139ff466b6d401b8e in linux-6.18.y/6.18.34
6c92f6d9600efa3ef0d9e560a2b52776d9803c29 in mainline linux
2026-06-02 03:48:34 +00:00
jsg 483483a0eb drm/amd/display: Validate GPIO pin LUT table size before iterating
From Harry Wentland
7ca695b3122297b06a3ed605bbe1cd32c85d9f5a in linux-6.18.y/6.18.34
86d2b20644b11d21fe52c596e6e922b4590a3e3f in mainline linux
2026-06-02 03:46:03 +00:00
jsg b98eaf3f52 drm/amd/display: Fix integer overflow in bios_get_image()
From Harry Wentland
6bbd703ea1c141d7ac0e7f7e82ff5fd237b67a17 in linux-6.18.y/6.18.34
cd86529ec61474a38c3837fb7823790a7c3f8cce in mainline linux
2026-06-02 03:43:47 +00:00
jsg db0070208a drm/amdgpu/vpe: Force collaborate sync after TRAP
From Alan Liu
3ed448c1dc78ddbf2e1f29dc00788c028ccdbb82 in linux-6.18.y/6.18.34
b6074630a461b1322a814988779005cbc43612ea in mainline linux
2026-06-02 03:41:44 +00:00
jsg f68a3a2979 drm/vblank: Fix kernel docs for vblank timer
From Thomas Zimmermann
141ffb83abe97db88df8822c82cd53ae5e38221a in linux-6.18.y/6.18.34
3946d3ba99342f3b9996e621f05e7003d4308171 in mainline linux
2026-06-02 03:38:53 +00:00
jsg 37e0c6717d drm/atomic: Increase timeout in drm_atomic_helper_wait_for_vblanks()
From Thomas Zimmermann
ed39ecd3a96cdf94589aef46f2f711cf93baa0d3 in linux-6.18.y/6.18.34
79ae8510b5b81b9500370f89c619b50ca9c0990f in mainline linux
2026-06-02 03:36:50 +00:00