1
0
mirror of https://github.com/openbsd/src.git synced 2026-04-24 14:14:37 +00:00
Commit Graph

242241 Commits

Author SHA1 Message Date
jsg
8eb219b328 remove unused extern 2025-11-30 23:46:03 +00:00
sashan
2e871bec67 pfctl_parser.c, ifa_load() should distinguish between broadcast
and PPP peer address when it populates interface table for rule
parser.

OK @claudio, OK @dlg
2025-11-30 23:39:45 +00:00
jsg
36f977f7f3 remove unused variable 2025-11-30 23:07:17 +00:00
jsg
6bf0f93af4 mention support for SAS3216 SAS3224 SAS3316 SAS3324 2025-11-29 23:19:12 +00:00
jsg
6c740cc628 match on SAS3216 SAS3224 SAS3316 SAS3324
tested by Derek on bugs@, SAS9305-16i card with SAS3324
2025-11-29 23:16:27 +00:00
jsg
99a9ec8042 regen 2025-11-29 23:13:14 +00:00
jsg
4a9041ef2d add device ids for LSI SAS3216 SAS3224 SAS3316 SAS3324 2025-11-29 23:12:28 +00:00
dlg
0086034ded don't complain about a driver not supporting pvlans.
found by denis@ with vxlan(4).

ok denis@
2025-11-29 10:51:16 +00:00
kn
21ed568f8a Reset getopts to decouple rcctl and daemon_flags; from obsd@mulh.net; OK sthen
ksh(1)'s OPTIND is global and only saved/restored for `function' style functions.

That means passing, e.g. -d to rcctl(8) would leave OPTIND=2 for rc_pre() in
rc.subr(8) scripts using getopts, thus starting (continuing, really) parsing
options at the second argument.
2025-11-29 10:44:46 +00:00
dlg
dc4c5894c4 fix some bpf code.
jsg@ pointed out that i was unconditionally calling bpf_mtap when
the convention is to test if the bpf if pointer is set before calling
bpf_mdap.

while here drop incoming packets if the bpf filter tells us to to
be consistent with the if_input handlers.

original nit pointed out by jsg@
2025-11-29 10:29:48 +00:00
dlg
f710b774eb i put the wrong version of the esp boot code in.
the way espopen() works on amd64 is different to arm64, and i was
missing the adaptation.

ok jmatthew@
2025-11-29 09:25:22 +00:00
dtucker
a522d78133 Add local hostname and pid to ~I escape connection info, only display
peer information for TCP connections including source address and port
This provides enough information to uniquely identify a connection on
the host or network.
2025-11-29 06:49:56 +00:00
dtucker
f715fee0e8 Add compression stats to ~I connection info escape option. 2025-11-29 05:00:50 +00:00
gkoehler
4f61defd3b Actually check that each @lib has its ${LIBname_VERSION}
pkg_create was skipping this check because it had "!$x =~ m/y/"
instead of "$x !~ m/y/".  The misplaced "!" warns in Perl 5.42.  When
afresh1 fixed the warning, it exposed other problems with the check.

Here, espie rewrites the check to allow @lib versions like
${LIBvala-${API_V}_VERSION} in lang/vala.  Substitute every variable
but the one we need, then ensure it matches what we want.

If you upgrade base but keep an old ports tree, then cad/qcad and
devel/libtalloc would fail to package; those 2 ports were fixed by
2025-11-21.

from Marc Espie <marc.espie.openbsd () gmail ! com>
bulk and ok jca@
ok afresh1@
2025-11-29 04:00:23 +00:00
dlg
7fc473ac6d start moving some global pf counters to per cpu counters.
this moves the pfctl_status.fcounters, which includes the state
search counter which is bumped every time the state table is searched.

the places that get a copy of these counters now have to read the
per cpu counters and fold them into a struct pf_status rather than
just copy the global now.

ok sashan@
2025-11-28 22:55:21 +00:00
dlg
2ce468791a add support for loading files (kernels) from the efi system partition.
this means you can put the openbsd boot loader and bsd.rd on the
efi boot partition and run the installer that way. this is a port
of the same code i got working on arm64.

ok jmatthew@
2025-11-28 22:51:59 +00:00
rsadowski
f9d861d10d Add "no banner" option to suppress Server header
Introduces a global and per-server "[no] banner" directive that prevents httpd
from sending the Server HTTP response header and removes server identification
from error documents. The SERVER_SOFTWARE CGI environment variable remains set
as required by RFC 3875.

Diff by Lloyd (thanks), ok kirill@
2025-11-28 16:10:00 +00:00
nicm
9c71d182a3 Do not remove TERM etc for commands run from config file, reported by
Dennis Eriksen.
2025-11-28 09:42:48 +00:00
nicm
88dc91f4cc session_index was never actually implemented, remove from man page. 2025-11-28 09:14:17 +00:00
florian
127809470f Sync to unbound
--------
Fix incomplete mitigation of CVE-2025-11411 by applying the non-test part of
https://nlnetlabs.nl/downloads/unbound/patch_CVE-2025-11411_2_wtests.diff

This extends the previous fix by also scrubbing unsolicited NS RRSets (and
their respective address records) for YXDOMAIN and nodata non-referral answers.
--------
2025-11-28 07:38:36 +00:00
florian
8c38ce86e6 Sync to unbound 1.24.1; heavy lifting by sthen (some time ago) 2025-11-28 07:37:51 +00:00
tb
d4da412f02 Clean up confusing logic in CMS_EncryptedData_encrypt()
This makes it easier to read and more in line with other code in
libcrypto. Also add a missing error check for the CMS_set_detached()
call.

ok jsing kenjiro
2025-11-28 06:07:09 +00:00
tb
d41533f00a Fix double free in certificate policies configuration
In nref_nos(), nnums must not be freed on error because in the caller it
is not->noticeref->noticenos and hangs off the POLICYQUALINFO qual which
is freed as part of POLICYQUALINFO_free() in the error path.

ok jsing kenjiro
2025-11-28 06:03:40 +00:00
bluhm
8a75dc3b44 Ignore any iterator when traversing nd6 list.
nd6_rtrequest() could crash with a NULL pointer dereference if an
interator in nd6_list was inspected.  Skip freeing neigbor discovery
entries and optimization in this unlikely case and try again later.

reported by Mischa and Anton Kasimov; OK mvs@
2025-11-27 21:54:28 +00:00
kettenis
49d7e2aa73 If there is no /memory node in the device tree, use the EFI memory map to
determine physmem.

ok jca@
2025-11-27 19:15:51 +00:00
jca
9ef6752b70 Use LOGIN_SETXDGENV in login(1)
Makes XDG_TUNTIME_DIR usable from text consoles.
"makes sense to me" landry@, ok matthieu@ robert@
2025-11-27 17:27:22 +00:00
rsadowski
076e7c3b07 Add missing GZIP_STATIC flag to SRVFLAG_BITS macro
GZIP_STATIC flag at position \33 was missing from the debug string.

Also correct the truncated PATH_REWRITE/NO_PATH_REWRITE flag names.
The PATH_REWRITE and NO_PATH_REWRITE flag names were truncated to
PATH and NO_PATH in the SRVFLAG_BITS string definition.

OK kirill@ deraadt@
2025-11-27 15:22:45 +00:00
sthen
b89c80c7e6 Fix incomplete mitigation of CVE-2025-11411 by applying the non-test part of
https://nlnetlabs.nl/downloads/unbound/patch_CVE-2025-11411_2_wtests.diff

This extends the previous fix by also scrubbing unsolicited NS RRSets (and
their respective address records) for YXDOMAIN and nodata non-referral answers.
2025-11-27 14:50:38 +00:00
hshoexer
fe7aaad813 Add license and rcs header.
ok tb
2025-11-27 11:55:08 +00:00
hshoexer
7de01a79e4 vmd(8): Use 32-bit direct kernel launch for both amd64 and i386
When bootet by /boot (or EFI boot loaders) both amd64 and i386
kernel start in a 32-bit mode.

When launching kernel directly (vmctl start -b <path>) vmd(8)
configures a flat 64-bit register set as default register set.  The
GDT provides a 32-bit flat code segment.

For the i386 kernel the default register set is reconfigured to
32-bit legacy mode; paging is enabled and uses 4 Mb pages.  This
is different to i386 being bootet by /boot.  /boot launches the
i386 kernel with paging disabled.

The amd64 kernel uses the default register set, i.e. long mode is
enabled in EFER.  However, it uses the 32-bit code segment of the
GDT.  Thus ther kernel is effectively running in 32-bit compatibility
mode.

This has implications when using SEV-ES as #VC traps are delivered
by 64-bit rules.  Booting an amd64 kernel on Linux/KVM the kernel
is actually running in 32-bit legacy mode, thus #VC traps are
delivered by 32-bit rules.  Therefore, we have two #VC trap handlers
for locore0, a 32-bit and a 64-bit one.

To simplify this, start both i386 and amd64 in 32-bit legacy mode
with paging disabled.

All in all with this diff the run time configuration is similar to
what /boot provides for both amd64 and i386.

In a later diff #VC trap handling in locore0 can be simplified.

ok mlarkin
2025-11-27 11:11:27 +00:00
martijn
0997852a93 Implement appl_sysuptime() in favour of smi_getticks().
appl_sysuptime() uses CLOCK_MONOTONIC instead of gettimeofday(), works
on a per context basis as per RFC2741, and puts it in a sane namespace.

Makes sense to tb@
OK jmatthew@
2025-11-27 10:17:19 +00:00
tb
44f31e46d7 tweak make "magic variables" handling
The idea is that it's shorter to special-case ${@D} and the likes
(two characters variables ending in D or F) instead of having a weird
idx encoding.

Cons:
- this yields an extra "ext" parameter to classify_var
Pros:
- the weird index encoding vanishes
- no need for special treatment if we add more similar variables.
- drastically reduces the size of the switch (and the modulo shrinks from
82 to 36)
- code will recognize constructs like ${?D} and ${?F}, which puts us in
line with FreeBSD and NetBSD bmake, and also with gnu make.

from espie
2025-11-27 09:08:49 +00:00
tb
8991323c18 openssl cms: switch to ASN1_STRING_get0_data()
The deprecated ASN1_STRING_data() will be removed in a future release.
This is one small step towards that.

ok kenjiro
2025-11-27 08:27:31 +00:00
tb
7e1adf15ef openssl pkcs12: stop reaching into ASN1_STRING
Buy a t: rename hex_prin() to hex_print() and accept an ASN1_STRING so that
we only need to use accessors once. Also avoid a printf %s NULL.

ok kenjiro
2025-11-27 08:26:32 +00:00
tb
b764a8d5e0 openssl ca: mechanical change to stop reaching into ASN1_STRING
ok kenjiro
2025-11-27 08:24:30 +00:00
tb
3fc06daa4a openssl asn1pars: don't reach into ASN1_STRING
ok kenjiro
2025-11-27 08:22:32 +00:00
dlg
6f1b9e49d0 refactor some mpls input processing for mpe/mpw/mpip.
mpw, mpip, and mpe all add entries to the local mpls fib that points to
themselves, and when these labels are "output" via these interfaces they
then go and push the packets into their input processing. this is all
boilerplate, so it can be factored out and better integrated into the
larger network stack. in particular, we can pass struct netstack through
to the input handlers.

there's some small downsides to this. the main one is that using
if_vinput to dispatch to their input handlers means the vinput
handling has to cope with mpls encapsulated packets. this is easy
except for mpw, where ether_ifattach does a lot of setup that has
to be tweaked for mpls encapsualted ethernet packets.

while here, this changes mpe output so it doesnt have to prepend the
mbuf with the sockaddr it uses as the nexthop on the underlay. it only
had to do that to carry the information across the ifq. if we just don't
use ifq for output then this gets simplified a lot. the only downside is
that you can't use altq on mpe interfaces after this. i dont think this
is a huge loss.

ok claudio@
2025-11-27 03:06:59 +00:00
dtucker
9973df7a58 Add Escape option ~I that shows information about the current SSH connection.
ok djm@, "I like/want" sthen@ florian@
2025-11-27 02:18:48 +00:00
nicm
2e20395a98 Newer libevents do not allow event_del on a zero'd event. 2025-11-26 19:02:03 +00:00
nicm
9a649d1223 Place cursor on correct line if message-line is not 0, reported by
Alexis Hildebrandt.
2025-11-26 18:57:18 +00:00
sf
6302f867ea SEV-ES: Implement wbinvd in the trap handler
When MP is enabled, OpenBSD uses the WBINVD instruction. With SEV-ES,
this causes a VC trap if the hypervisor has the WBINVD intercept enabled.
In the trap handler, simply forward the WBINVD exit to the hypervisor.

From Sebastian Sturm

ok mlarkin hshoexer
2025-11-26 13:48:57 +00:00
tb
4d7cf82b62 libcrypto: add header guards to *_local.h
An upcoming change requires the inclusion of asn1_local.h in x509_local.h
which doesn't work due to missing header guards. Add guards to all local
headers that don't have them, although reacharounds and multiple inclusions
are unlikely to occur for most of those.

ok jsing
2025-11-26 10:19:57 +00:00
ratchov
856b2687a9 sndiod: Enable fall-back audio devices by default
If the server.device control is used to switch to a new device, then
sndiod will always try to use it first. If the device is not present
sndiod will try to fall back to the previous one and so on until a
working device is found.

ok armani
2025-11-26 08:40:16 +00:00
dlg
62b1fc1bb7 raise the min number of connections to 1. 0 doesn't make sense.
ok djm@
2025-11-26 07:27:13 +00:00
dlg
cf33112e94 white space fixes, no functional change 2025-11-26 06:57:24 +00:00
dlg
244266f8f4 allocate ifiqs for vport interfaces.
there are some situations where vport will queue packets it has
"received". this spreads the processing of them over the softnet
threads.

this is like what's done for lo(4) and rport(4)
2025-11-26 03:43:29 +00:00
dlg
4013668b64 sigh, committed the wrong version of the pf_test in code. unbreak build. 2025-11-26 02:13:54 +00:00
dlg
3a5ac944e1 only run pf on incoming packets on untagged (port native vlan) packets. 2025-11-26 01:43:56 +00:00
kettenis
6603af83d0 Handle a "dma-noncoherent" property on the root node of the device tree.
Consistently use OF_getpropbool() for the "dma-coherent" and
"dma-noncoherent" properties.

ok patrick@, miod@, phessler@, jca@
2025-11-25 21:52:47 +00:00
nicm
34f94be7b8 Add seconds options for clock mode, from augustus7613 dot mail at pm dot
me in GitHub issue 4697.
2025-11-25 21:24:27 +00:00