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

244651 Commits

Author SHA1 Message Date
nicm 7d2efe2b68 Bring in some more floating panes changes - obscured panes need to be
handled specially in screen_write_* rather than dropping into the client
redraw (tty.c).
2026-05-27 11:54:28 +00:00
claudio 0ba5443af8 Add some extra checks to the mrtparser
Fail if the mrt message length is larger than MRT_MAX_LEN (1MB).
No message should have such a large size.
Ensure the dump callback is never called with a mrt peer table
that is NULL.

Reported by 7Asecurity
OK tb@
2026-05-27 11:17:42 +00:00
claudio 78fe307b2e Add an explict "--" argument for portable.
GNU libc getopt allows options out of order with other arguments
so force getopt to stop option parsing using "--".
OK tb@
2026-05-27 09:42:19 +00:00
claudio d96f8cf180 Add a "--" argv to the execvp of bgpctl for portable.
GNU libc has this stupid behaviour of allowing options in any order
and so one needs to terminate the option parsing to be sure none of
the later user supplied arguments could be interpreted as an option.

Reported by 7Asecurity
OK tb@
2026-05-27 09:39:25 +00:00
claudio 591ca9ec1d Don't fail hard on version mismatch and ignore extra end-of-params messages.
Replace the lerrx on version mismatch with a lwarnx and error return.
Switch to ssize_t return for that so that slowcgi_request() can properly
fail when this happens.

Also do not execute multiple bgplgd commands when extra end-of-params
messages are received. Once a command is executed fail to start a 2nd
one.

Reported by Frank Denis
OK tb@
2026-05-27 08:48:43 +00:00
claudio ed61467928 Improve handling of unknown extended communities
Ext communities are split over the 3 data fields of struct community.
All ext communities put the first 2 bytes (type and subtype) into data3.
For EXT_COMMUNITY_TRANS_IPV4 and EXT_COMMUNITY_TRANS_FOUR_AS a 2-4-2 split
is used. All other types use a 2-2-4 split this should include all unknown
types. So add default cases into the various switch statements to make this
happen.

Reported by 7Asecurity
OK tb@
2026-05-27 08:38:43 +00:00
claudio 0dbbbf5036 Increase the MRT attribute buffer to MAX_EXT_PKTSIZE so it works in all cases.
Dumping messages from peers with extended message capability would fail
since the MRT code was still limited to the old 4096byte size.

Reported by 7Asecurity
OK tb@
2026-05-27 08:34:34 +00:00
claudio 0b903cb7ba Fix use-after-free problems in parse.y
In error cases using YYERROR data is freed but the global pointer is not
reset (to NULL or in the case of curpeer to curgroup). On YYERROR yacc
still moves on and so any rules using e.g. curpeer do a use-after-free.

Reported by 7Asecurity
OK tb@
2026-05-27 08:32:20 +00:00
claudio 8da6e17f10 Move pt_unref() after the RB_REMOVE() call in rib_remove() to
prevent use-after-free.

rib_remove calls pt_unref() before the RB_REMOVE() call which also uses
re_rib(). re_rib() evaluates re->prefix but pt_unref() could free the
prefix if the refcount drops to 0.

Reported by 7Asecurity
OK tb@
2026-05-27 08:28:35 +00:00
jsg 59afafd236 fix sort_get_clients() indentation; ok nicm@ 2026-05-27 07:05:20 +00:00
nicm 44ca0aff17 Check error result correctly (*cause not cause), pointed out by jsg. 2026-05-27 07:01:36 +00:00
deraadt 6861f874fc sync 2026-05-27 06:32:32 +00:00
rsadowski 6239428ed4 newsyslog: add glob(3) support for logfile names
Allow glob patterns in the logfile_name field of newsyslog.conf(5),
so that entries like /var/log/app/*.log are expanded at parse time.

From Alvar Penning, feedback and OK jan@
2026-05-27 05:56:57 +00:00
tb 6035b2757f ssh-agent: add -V to usage()
ok djm
2026-05-27 03:28:07 +00:00
kevlo 19d2e68b7a add RCS id
ok claudio@
2026-05-27 03:13:13 +00:00
kevlo 34e80d67dd In mt7921_e_mcu_fw_pmctrl(), val and mask were swapped.
Use PCIE_LPCR_HOST_OWN_SYNC for both to make the intent clear.

ok claudio@
2026-05-27 03:12:22 +00:00
djm 9ad264c2d5 use "ssh-agent -V" to test the binary is functional after relinking
requested deraadt@
2026-05-27 03:05:21 +00:00
djm 5d5d5d78ff add a -V flag to print the version, but mostly as a way to check
the binary is functional; ok deraadt@
2026-05-27 03:04:30 +00:00
gilles 3b4f66f6dd clear userinfo before sending over imsg.
This is not an issue by itself but it weakens compartmentalization and may assist
lateral movement inside the privsep environment after another bug.

diff by Stuart Thomas <stuart.thomas@triageforge.co.uk>
2026-05-26 22:49:18 +00:00
gilles 388bcdaeab Reject oversized sockaddr payloads received over privsep IPC.
This is not an issue on its own but may permit lateral movement or memory corruption
inside the privsep environment after another bug.

diff by Stuart Thomas <stuart.thomas@triageforge.co.uk>
2026-05-26 22:48:13 +00:00
gilles 2c717ae1c6 Zero the temporary envelope parsing buffers before use.
While current parsing paths do not expose uninitialized data, keeping stack residue
in these transient buffers unnecessarily weakens compartmentalization and may aid
lateral movement inside the privsep environment after another bug.

The diff also fixes a theoretical double close race bug which can't really happen in
smtpd due to requiring concurrency in our single threaded event loop, and which would
have very limited reliability impact if it was triggered (forcing a mail to fail on a
schedule tick and be retried at next tick). This is still incorrect so let's avoid a
copy of this code in more problematic places.

diff by Stuart Thomas <stuart.thomas@triageforge.co.uk>
2026-05-26 22:44:17 +00:00
gilles c2e63d99c0 Ensure pending asynchronous lookups do not retain dangling smtp_session references after teardown.
This is mainly a robustness fix inside the privsep model:
stale references may permit lateral effects between smtpd processes after another compromise.


diff by Stuart Thomas <stuart.thomas@triageforge.co.uk>
2026-05-26 22:43:32 +00:00
gilles b5293542b6 validate encrypted queue buffer sizes before processing auth tag and IV data:
current callers already treat malformed input as a decrypt failure but rejecting
truncated buffers earlier makes boundary conditions more explicit.

diff by Stuart Thomas <stuart.thomas@triageforge.co.uk>
2026-05-26 22:39:33 +00:00
claudio afc0fddbd2 Pass correct argument to m_tag_delete() in ip_srcroute()
When the ip_srcroute function was redone to follow what FreeBSD did
the m_tag_delete() call was not correctly adjusted. In FreeBSD the
tag data structs always start with a struct m_tag while in OpenBSD
this wrapping is not done.

ip_srcroute is disabled by default and nobody sane turns it on.

From a report by Frank Denis
OK dlg@ deraadt@
2026-05-26 20:43:31 +00:00
bluhm 5e3c375ef2 Correct ICMPv6 parameter problem in IPv6 destination option.
If the destination option is placed in a different mbuf than the
IPv6 header, the calculation of the parameter problem offset was
wrong.

found by Quarkslab Vulnerability Reports
OK deraadt@
2026-05-26 20:27:27 +00:00
kettenis f839d5f655 Add missing break.
From Jan Schreiber
2026-05-26 18:28:02 +00:00
renaud 51e8ce08d8 Fix signed integer overflow in repetition count
OK tb@
2026-05-26 15:59:22 +00:00
deraadt 4d2a376e62 sync 2026-05-26 15:13:55 +00:00
kirill 2587ef69c1 sys/ufs: make ufs_readdir() use UFS_BUFATOFF()
Read directory data through UFS_BUFATOFF() instead of routing the
operation through VOP_READ() into a temporary kernel buffer; this keeps
directory entry decoding on the buffer cache path, bounds each transfer
by the buffer size, file size, and caller supplied count, and releases
each buffer after complete entries are converted.

Since VOP_READ() no longer provides the access time side effect, mark
IN_ACCESS under the same MNT_NOATIME rule used by ffs_read().

OK: deraadt@
2026-05-26 15:01:16 +00:00
kirill 68141c46bb sys/qwz: add AMPDU callbacks
Add the same BlockAck task and AMPDU callback plumbing used by qwx.

This wires net80211 ADDBA/DELBA handling into the existing qwz RX
TID/reorder setup code, while leaving TX aggregation to firmware as qwx.

OK: stsp@
2026-05-26 14:55:16 +00:00
kirill 68548d36b5 sys/qwz: add 802.11n with 40Mhz width
OK: stsp@
2026-05-26 14:54:32 +00:00
ratchov 05c105ace0 sndiod: Make the device sample rate and buffer sizes global 2026-05-26 14:50:52 +00:00
kettenis f95fb9a08f Our kernel uses the medany code model, so we don't need the GP in the
kernel.  GP relaxation requires the medlow code model, which we don't want
because it will limit future kernel address space randomization.

Should fix linking the riscv64 kernel with llvm 22.

ok jca@
2026-05-26 14:12:34 +00:00
deraadt 073f8cc69d the relink binaries are always a .tar file. scan for them using
find, rather than having to list them.  This will make it easier
to add new ones.
help from jsg
2026-05-26 14:11:53 +00:00
hshoexer 3c9734eb33 iked: Avoid NULL-deref in ocsp_connect_finish()
Several error path in ocsp_connect() can call ocsp_connect_finish()
with oc == NULL.  This will result in a NULL-deref.  To recover
gracefully the child requesting the OCSP file descriptor needs to
be notified, otherwise the stale request will exist in the child
forever.  To accomplish this, provide struct iked_sahdr *sh directly
to ocsp_connect_finish() as a parameter.  So sh is guaranteed to
be valid even when oc is NULL.

While there, avoid a potential double-free on oc_path when a strdup(3)
fails.

ok tobhe@
2026-05-26 11:17:14 +00:00
sthen a43614b38d merge unbound 1.25.1 2026-05-26 11:14:10 +00:00
sthen 4e68b3dc6c import unbound 1.25.1 2026-05-26 11:10:47 +00:00
jsing 9933cf87a8 Fix test_valid_uri() by passing the correct entry to strlen(). 2026-05-26 09:35:53 +00:00
dgl 6805718aab Ensure asr's sockets are close-on-exec to avoid a potential leak into children.
ok jca brynet
2026-05-26 07:30:37 +00:00
mglocker 4a7ccfbc1a Enable samsabi(4).
ok kettenis@
2026-05-26 03:54:14 +00:00
mglocker 7228468d5f Add man page for the new samsabi(4) driver.
ok kettenis@
2026-05-26 03:52:37 +00:00
mglocker 3b711f42e2 Add samsabi(4), a driver for the Samsung Advanced BIOS Interface (SABI),
a vendor command interface of the embedded controller found in Samsung
laptops.

For now we support keyboard backlight control, as tested on the Samsung
Galaxy Book4 Edge.

Feedback and ok kettenis@
2026-05-26 03:51:11 +00:00
jsg bd7f610059 remove unused prototypes 2026-05-26 01:22:08 +00:00
jsg d6937f1547 remove unused fiq code; ok miod@ 2026-05-26 01:06:07 +00:00
kirill 650e0e4886 sys/qwz: use devices number of RX and TX streams
It actually mirrors Linux ath12k

OK: mglocker@
2026-05-25 20:33:58 +00:00
kirill fc1c3a8fd5 sys/uvm/pdaemon: compare constraints in paddr units
uvm_constraint_range bounds are physical addresses, as is
VM_PAGE_TO_PHYS(). Do not apply atop() before comparing them, otherwise
the pagedaemon matches page frame numbers against byte address ranges.

OK: kettenis@, deraadt@
2026-05-25 20:29:27 +00:00
nicm f5f1f41ad1 pane_zoomed_flag went missing somewhere in tmux.1, put it back. 2026-05-25 14:53:09 +00:00
jsg c7a005c917 EACESS -> EACCES 2026-05-25 13:58:58 +00:00
jsg 61b7e18e57 remove prototype for removed dtls1_get_cipher()
ok jsing@
2026-05-25 13:34:58 +00:00
jsg 5d60ee5c48 drm/ttm: Convert -EAGAIN from dmem_cgroup_try_charge to -ENOSPC
From Thomas Hellstrom
9a34b94832c374543ce553d4cec6eda6955397d1 in linux-6.18.y/6.18.33
591711b32681a04b57d00c2a404658f8419a081c in mainline linux
2026-05-25 09:59:38 +00:00