1
0
mirror of https://github.com/openbsd/src.git synced 2026-06-17 23:03:29 +02:00

245151 Commits

Author SHA1 Message Date
mvs def7607e31 Use temporary buffer for thread name copying between kernel space and
user land within sys_{get,set}thrname().

ok claudio
2026-06-10 04:45:22 +00:00
jsg 01c8afc222 In inteldrm_activate(), move the rasops_show_screen() call to before
drm_client_dev_restore().  The same order as inteldrm_doswitch() and
inteldrm_enter_ddb().
2026-06-10 04:33:13 +00:00
tb 1a6a13bae9 x509_verify: fix incorrect purpose check in the non-legacy path
If a purpose is configured on the verify context (which it currently
never is), this check would only accept certificates for which the
purpose check fails. Also, this code is not currently reachable from
public API since x509_verify() is only ever called with a legacy xsc
set on the verify ctx, so x509_verify_ccert_extensions() takes the
path returning 1 earlier.

X509_check_purpose() is one of these strange legacy APIs. It returns -1
on error, 0 if the cert fails the purpose check, 1 if it passes it and
values between 2 and 5 indicate various legacy garbage meaning that the
cert might possibly have been fit for this purpose until around a quarter
century ago. While for CA certs the checks in "No we don't care about ..."
exclude return values > 1, it is still possible for the S/MIME purpose
to return 2 due to a workaround for some buggy NS certs, for example.

In short: anything but 1 means unfit for the purpose or at best dubious,
so reject such certs.

Reported by Frank Denis

ok kenjiro
2026-06-10 04:26:58 +00:00
jsg 3879318af7 drm/i915/psr: Use DC_OFF wake reference to block DC6 on vblank enable
From Jouni Hogander
21bfa15a89d888d37e4881d64fc473cb85f4697a in linux-6.18.y/6.18.35
3549a9649dc7c5fc586ab12f675279283cdcb2a7 in mainline linux
2026-06-10 00:24:57 +00:00
jsg 233b85f5b4 drm/amdgpu: check num_entries in GEM_OP GET_MAPPING_INFO
From Ziyi Guo
f059b4c493df3e54fe3ffe4658009c31864275da in linux-6.18.y/6.18.35
a1ba4594232c87c3b8defd6f89a2e40f8b08395d in mainline linux
2026-06-10 00:21:35 +00:00
jsg b22720d7a7 drm/amdgpu: fix calling VM invalidation in amdgpu_hmm_invalidate_gfx
From Christian Koenig
fa372f4e8aeff6d0d3dd2f14b9165b4013e72a6d in linux-6.18.y/6.18.35
1c824497d8acd3187d585d6187cedc1897dcc871 in mainline linux
2026-06-10 00:19:24 +00:00
jsg 645d03bff1 drm/amdgpu: fix lock leak on ENOMEM in AMDGPU_GEM_OP_GET_MAPPING_INFO
From Michael Bommarito
1eb86334e391695d4a40743b114afc15df4dc506 in linux-6.18.y/6.18.35
2e7f55eb408c3f72ee1957a0d0ad11d8648a6379 in mainline linux
2026-06-10 00:17:13 +00:00
jsg 9a2cd901ba drm/amdkfd: Check for pdd drm file first in CRIU restore path
From David Francis
275396bf71c4d30a2a86ccf078f732cc9fe17e26 in linux-6.18.y/6.18.35
6842b6a4b72da9b2906ffc5ca9d846ace2c54c14 in mainline linux
2026-06-10 00:14:14 +00:00
jsg a7f980a291 drm/amdkfd: fix a vulnerability of integer overflow in kfd debugger
From Eric Huang
5cf4a41aa0d74e4c83f82d2ce233b5189ed4b43c in linux-6.18.y/6.18.35
93f5534b35a05ef8a0109c1eefa800062fee810a in mainline linux
2026-06-10 00:12:30 +00:00
jsg e8f772d6e8 drm/amdkfd: fix NULL pointer bug in svm_range_set_attr
From Eric Huang
2f9c3c161692f5bf1436e869a651bed10936e071 in linux-6.18.y/6.18.35
e984d61d92e702096058f0f828f4b2b8563b88ce in mainline linux
2026-06-10 00:10:28 +00:00
jsg bfe81926b5 drm/amd/pm/si: Disregard vblank time when no displays are connected
From Timur Kristof
ffa7dce35b64fc5cfce56fe9f164c708a6b5ca54 in linux-6.18.y/6.18.35
dd4f3ee535b3b0ac027f75dbf9dc5fc88733c765 in mainline linux
2026-06-10 00:08:37 +00:00
jsg 4358775487 drm/i915: Fix potential UAF in TTM object purge
From Janusz Krzysztofik
c9ae7e7e3bc98615364313b08d7acea5239ded0b in linux-6.18.y/6.18.35
5c4063c87a619e4df954c179d24628636f5db15f in mainline linux
2026-06-10 00:06:25 +00:00
beck ff03df9b11 Remove the buffer flipper
This makes the buffer cache have only one clean cache,
and to not care about where memory is allocated from.

IO devices are expected to be able to handle IO from a
buf at any physical address.

ok kettenis@ deraadt@
2026-06-10 00:04:38 +00:00
jsg 3733a85a1a drm/i915/psr: Block DC states on vblank enable when Panel Replay supported
From Jouni Hogander
fed64e47a32f390fb3a0fc7c87b8ef96c8897333 in linux-6.18.y/6.18.35
8bb9093df555f9e89fdbe1405118b11384c03e04 in mainline linux
2026-06-10 00:01:49 +00:00
jsg 05602d53a4 drm/gem: fix race between change_handle and handle_delete
From Zhenghang Xiao
0dfa42cfe4dbe114533480503934f43e33c1e83d in linux-6.18.y/6.18.35
7164d78559b0ff29931a366a840a9e5dd53d4b7c in mainline linux
2026-06-10 00:00:03 +00:00
jsg 440984bd8b drm/i915/psr: Apply Intel DPCD workaround when SDP on prior line used
From Jouni Hogander
487393023feb57ce5305e00eaae21dd50520f3d0 in linux-6.18.y/6.18.35
4703049f768fc1c1caac754134118bee1a3af189 in mainline linux
2026-06-09 23:57:49 +00:00
jsg 16db0c9d8b drm/i915/psr: Read Intel DPCD workaround register
From Jouni Hogander
c058cf6b84c131c3f535f5fd08ec6eba1e9da9df in linux-6.18.y/6.18.35
f30bece421a4ae34359254e1dc2a187a42b6af9b in mainline linux
2026-06-09 23:55:26 +00:00
jsg 6a9e47b6df drm/i915/psr: Add defininitions for INTEL_WA_REGISTER_CAPS DPCD register
From Jouni Hogander
dd4cbab2a446d87b94f8337e38653a0f9a679ded in linux-6.18.y/6.18.35
fbceb39b536e40c2f7cc47ab42037bb7c2b7ced9 in mainline linux
2026-06-09 23:52:38 +00:00
millert 04a397d457 lpd: require data file path name to be in the spool dir
When processing the control file, any file to be printed must be
located in the spool directory (e.g. dfA000foobar) either as a
regular file or a symbolic link to another file to be printed.  This
matches the handling of the 'U' (unlink) directive.

OK deraadt@
2026-06-09 21:46:48 +00:00
nicm 65c91b083c Preserve the original text in the first line for display-panes. 2026-06-09 21:31:16 +00:00
claudio 380e0ca49b Inline mwx_mcu_init() into mwx_init_hardware() and add
mt7925_mcu_set_eeprom() which must be called during hardware init.
Tested on 7921 and 7925 (which now fails in mt7921_mac_init).
2026-06-09 21:27:25 +00:00
nicm a6cfdb8300 Add a context for cell/palette/hyperlinks when drawing to tty to avoid
passing so much in parameters.
2026-06-09 21:22:22 +00:00
claudio 22130f212a Add various checks in mwx_load_firmware() to ensure that the buffer
passed to mwx_mcu_send_firmware() does not move beyond the firmware
image.  For regions flagged with FW_FEATURE_NON_DL don't forget to
increase the offset.
2026-06-09 21:19:41 +00:00
claudio f2c4c47c06 Kill MWX_IS_CONNAC2 macro and just use sc->sc_hwtype != MWX_HW_MT7925
like everywhere else.

Right now only MT7925 is different from MT7920/21/22 so just use one
common way to do these checks.
2026-06-09 21:07:15 +00:00
kirill 266ce51e93 sys/powerpc64: add em* to RAMDISK
OK: deraadt@
2026-06-09 15:18:26 +00:00
nicm 6778b3d3b6 Use name as marker for failure not type (which must be set to be in the error). 2026-06-09 12:58:40 +00:00
nicm adc976908d Add missing headers. 2026-06-09 12:57:40 +00:00
nicm fe914b0428 Clarify -a for kill-window, kill-session. 2026-06-09 12:51:57 +00:00
tb 19f1655fb5 Avoid freeing a caller-owned buffer in PKCS7_verify()
If a PKCS#7 S/MIME message comes with an empty set of digestAlgorithms
in the SignedData, PKCS7_verify() would incorrectly free a caller-owned
buffer. Fix the freeing logic to avoid this situation.

From Igor Ustinov via OpenSSL
2026-06-09 12:34:08 +00:00
tb eac9b14b2a Add some missing bounds checks to ASN1_mbstring_copy()
If the in string is unreasonably long, assigning strlen(in) to an int
may overflow, so exclude this situation.

Moreover, the code would unconditionally multiply nchar by 2 or 4,
which could again overflow an int. Check for this situation and error
out to avoid an out of bounds write.

More may be needed in here, which will be revisited later.

Based on a diff by Viktor Dukhovni via OpenSSL.
2026-06-09 12:29:47 +00:00
nicm 3336741c5e Add -f for filter with -a to kill-pane, kill-window, kill-session.
GitHub issue 4782.
2026-06-09 12:24:59 +00:00
tb 06bb1433e0 Avoid out-of-bounds read in CMS password-based decryption
The RFC 3211 PWRI integrity check when unwrapping the password-derived key
accesses seven bytes from a heap-allocated buffer. If an (invalid) block
cipher with short blocks is in use 2 * blocksize may not be sufficient room
for 7 bytes. In that silly case, the function performs an OOB read. Add
length check to avoid this situation

From Igor Ustinov via OpenSSL.
2026-06-09 12:20:34 +00:00
tb 3cfdab8ab2 Avoid NULL dereference in password-based CMS decryption
The keyDerivationAlgorithm field is OPTIONAL in the ASN.1 but required
for password-based CMS. Check that the field is present before using it
to avoid a crash.

From Igor Ustinov via OpenSSL
2026-06-09 12:12:34 +00:00
nicm 40d99f35c6 Two fixes for RI codepoints. Firstly, do not combine more than two of
them - previously we were ending up with four codepoints in one cell
which tmux believed to be width 2, but terminals considered width 4.
Secondly, invalidate cursor position before redrawing the cell when the
second codepoint is received, terminals vary in how they manage
backspace and cursor movement across these characters, so it is better
to use absolute rather than relative positioning. GitHub issue 4853.
2026-06-09 11:49:36 +00:00
jsg 3bf0ca5484 call rasops_show_screen() in inteldrm_activate() wakeup
From Walter Alejandro Iglesias who reports this stops garbage on screen
when resuming from hibernate without switching vt, on a unknown machine.
Avoids a similar problem on matthieu's Framework Alder Lake, and mvs'
Gemini Lake and Alder Lake machines.
2026-06-09 11:23:02 +00:00
nicm f659a34568 Add -B to new-pane/split-window to block until the command exits, like
run-shell -b.
2026-06-09 09:11:05 +00:00
nicm d89bad393c Do not use NULL arguments, bug spotted by Dane Jensen. 2026-06-09 08:11:53 +00:00
robert c6e406052a fix a mismerged patch for defaulting to -mno-relax on OpenBSD; from Brad 2026-06-09 06:41:08 +00:00
tb e39095509a fmt_scaled: add some regress for signed overflow edge cases.
looks good to claudio, ok djm
2026-06-09 06:01:28 +00:00
tb fcb5a24fd8 Avoid signed overflow in fmt_scaled
Adding the scaled fractional part to whole may result in a signed overflow.
Guard against this by adding checks before subtracting or adding.

problem pointed out by a friend of claudio's
fix looks good to claudio, ok djm
2026-06-09 06:00:13 +00:00
tb 7399bf8369 fmt_scaled: make regress compile again with old gcc
looks good to claudio
ok djm
2026-06-09 05:58:51 +00:00
tb a6259270fd ecdh: add error codes for point at infinity/not on curve
The point at infinity would previously raise EC_R_POINT_AT_INFINITY via
EC_POINT_get_affine_coordinates(). For consistency, also raise an error
for off-curve points.

pointed out by/ok kenjiro
2026-06-09 05:24:47 +00:00
tb d027729733 Fix strange error check in EC_POINT_get_affine_coordinates
EC_POINT_is_at_infinity() has a Boolean return nowadays, so drop > 0.

ok jsing kenjiro
2026-06-09 05:23:30 +00:00
tb ec20d7d79d ssl_kex: exercise an invalid point as well 2026-06-09 05:20:38 +00:00
tb 7b8bc4ba51 ssl_kex: ensure decode_error alert is raised 2026-06-09 05:17:24 +00:00
jsg 0911d52936 switch nfs_getreq() to nfsd_adv()
from miod@ ok jsg@

This round of commits was prompted by a double-free report
from Andrew Griffiths at Calif.

server nfs request mbuf pointers were stored in two structs:
nmi_mrep in struct nfsm_info
nd_mrep in struct nfsrv_descript
but only set to NULL after m_freem() in nmi_mrep

This problem is avoided by removing the use of struct nfsm_info
in the server paths and passing struct nfsrv_descript to
new versions of the nfsm functions.
2026-06-09 03:20:01 +00:00
jsg 90b9dafe0f remove use of struct nfsm_info in nfs_serv.c (the non-trivial part)
with and ok miod@
2026-06-09 03:14:22 +00:00
jsg 41c7b2bcb8 remove use of struct nfsm_info in nfs_serv.c
with and ok miod@
2026-06-09 03:12:46 +00:00
jsg 4399304b9e convert nfs_serv.c from nfsm_mtouio() to nfsd_mtouio()
with and ok miod@
2026-06-09 03:11:12 +00:00
jsg 1827201e79 convert nfs_serv.c from nfsm_strsiz() to nfsd_strsiz()
with and ok miod@
2026-06-09 03:09:31 +00:00