Make sure to bounds check the cursor column when moved by escape sequences,
when double-width character mode is enabled. This could lead to out-of-bounds
array accesses.
Reported by OpenAI.
from miod@
this is errata/8.0/019_wscons.patch.sig
Make sure to bounds check the cursor column when moved by escape sequences,
when double-width character mode is enabled. This could lead to out-of-bounds
array accesses.
Reported by OpenAI.
from miod@
this is errata/7.9/054_wscons.patch.sig
Avoid use-after-free in IPv6 duplicate address detection.
An expired DAD timer waiting for netlock could find the dadq of a
new DAD for the same address and destroy it while its timer was
still pending. Pass struct dadq to the timer and check under
exclusive netlock that it is still the active one.
from OpenAI
from bluhm@; OK deraadt@ mvs@
this is errata/8.0/018_nd6dad.patch.sig
Avoid use-after-free in IPv6 duplicate address detection.
An expired DAD timer waiting for netlock could find the dadq of a
new DAD for the same address and destroy it while its timer was
still pending. Pass struct dadq to the timer and check under
exclusive netlock that it is still the active one.
from OpenAI
from bluhm@; OK deraadt@ mvs@
this is errata/7.9/053_nd6dad.patch.sig
Fix race where TCP syn cache could free a used route.
Route timer code is not MP safe and relies on netlock. As
syn_cache_put() may free a route, syn_cache_timer() has to hold
shared netlock until syn_cache_put() has finished.
from OpenAI
from bluhm@; OK mvs@ deraadt@
this is errata/8.0/017_tcpsyn.patch.sig
Fix race where TCP syn cache could free a used route.
Route timer code is not MP safe and relies on netlock. As
syn_cache_put() may free a route, syn_cache_timer() has to hold
shared netlock until syn_cache_put() has finished.
from OpenAI
from bluhm@; OK mvs@ deraadt@
this is errata/7.9/052_tcpsyn.patch.sig
Do not advance snd_nxt and snd_max for TCP SACK retransmits.
In the SACK case, the calculation that decided whether we should
adjust snd_nxt and snd_max was wrong. Use the same logic as FreeBSD
and NetBSD, and never advance them when retransmitting a SACK hole.
This may delay a FIN packet in a corner case, but the logic gets
much simpler. Also simplify the SACK checks, sack_rxmit is only
set if tp->sack_enable is true.
reported by OpenAI
from bluhm@; OK sashan@
this is errata/8.0/016_tcpsack.patch.sig
Do not advance snd_nxt and snd_max for TCP SACK retransmits.
In the SACK case, the calculation that decided whether we should
adjust snd_nxt and snd_max was wrong. Use the same logic as FreeBSD
and NetBSD, and never advance them when retransmitting a SACK hole.
This may delay a FIN packet in a corner case, but the logic gets
much simpler. Also simplify the SACK checks, sack_rxmit is only
set if tp->sack_enable is true.
reported by OpenAI
from bluhm@; OK sashan@
this is errata/7.9/051_tcpsack.patch.sig
Avoid recursive cleanup in getrrsetbyname()
Instead of freeing struct dns_query and struct dns_rr by walking the
linked lists recursively, use a simple loop. This avoids a possible
stack exhaustion unlikely to be reachable with the limits modern
resolvers impose.
From Dhiraj Mishra
from tb@; OK djm@
Ensure asr's sockets are close-on-exec to avoid a potential leak into children.
from dgl@; OK jca@ brynet@
Skip aliases that are not valid hostnames in gethostbyname(3).
Consider the following CNAME chain:
chain7.narrans.de. 60 IN CNAME chain\007.tlakh.xyz.
chain\007.tlakh.xyz. 60 IN CNAME chain.sha256.net.
chain.sha256.net. 60 IN CNAME sha256.net.
sha256.net. 60 IN A 213.239.192.17
gethostbyname(3) would fail the query when it encounters
chain\007.tlakh.xyz. and tries to add it to h_aliases member of struct
[78 lines not shown]
Revert rev. 1.134 of uvm_vnode.c because it introduces a reference race
uo_refs is not really serialized by the vmobjlock and at least in
uvm_vnp_sync() it depends on the KERNEL_LOCK for that.
The optimisation done in 1.134 predates the rwlock rework done by dlg@
and is probably no longer important. The vmobjlock is still contended
but the wakeup storm resulting in massive KERNEL_LOCK spin is gone.
Reported by Acts1631
from claudio@; OK kettenis@ deraadt@
u_obj.uo_refs must be managed using atomic_inc_int_nv() and friends
or the reference counting and inspection can evaluate incorrect.
This affecs kbind.
from deraadt@; OK claudio@ krw@
diff from openai
this is errata/8.0/014_kbind.patch.sig
Revert rev. 1.134 of uvm_vnode.c because it introduces a reference race
uo_refs is not really serialized by the vmobjlock and at least in
uvm_vnp_sync() it depends on the KERNEL_LOCK for that.
The optimisation done in 1.134 predates the rwlock rework done by dlg@
and is probably no longer important. The vmobjlock is still contended
but the wakeup storm resulting in massive KERNEL_LOCK spin is gone.
Reported by Acts1631
from claudio@; OK kettenis@ deraadt@
u_obj.uo_refs must be managed using atomic_inc_int_nv() and friends
or the reference counting and inspection can evaluate incorrect.
This affecs kbind.
from deraadt@; OK claudio@ krw@
diff from openai
this is errata/7.9/049_kbind.patch.sig
libssl: bump sigalg maximum to 256
With PQ algorithms getting more widely deployed, the formerly generous cap
of 32 sigalgs has long been known to be too tight for a while. A couple of
years back jmatthew ran into interop issues with the oqs provider being
enabled on OmniOS by default. OpenSSL 4.1 now announcing 39 sigalgs, this
is becoming a real-world problem and is first and foremost protecting us
from seamless interop with other stacks.
To this end, introduce a helper shared between client and server to cap
the list size and a macro similar to the one we have for supported groups.
Thanks to DabeDotCom for reporting.
Fixes https://github.com/libressl/portable/issues/1446
from tb@; OK jsing@
Correct outgoing record checks in the legacy TLSv1.2 stack.
Ensure an existing record is not being written prior to commencing
renegotiation or sending an alert in the legacy TLSv1.2 stack. The way
that TLSv1.2 records are sent was changed in r1.79 of ssl_pkt.c, however
this failed to correctly handle outgoing record checks. This means that
renegotiation can be commenced or an alert can be sent while an application
[11 lines not shown]
libssl: bump sigalg maximum to 256
With PQ algorithms getting more widely deployed, the formerly generous cap
of 32 sigalgs has long been known to be too tight for a while. A couple of
years back jmatthew ran into interop issues with the oqs provider being
enabled on OmniOS by default. OpenSSL 4.1 now announcing 39 sigalgs, this
is becoming a real-world problem and is first and foremost protecting us
from seamless interop with other stacks.
To this end, introduce a helper shared between client and server to cap
the list size and a macro similar to the one we have for supported groups.
Thanks to DabeDotCom for reporting.
Fixes https://github.com/libressl/portable/issues/1446
from tb@; OK jsing@
this is errata/7.9/048_libressl.patch.sig
Backport security fixes from zlib 1.4
From the 9 security fixes listed in
https://github.com/madler/zlib/releases/tag/v1.4
we already have the fix for CVE-2026-85091 in 8.0.
The remaining 8 of these are cherry-picked here for userland, 6 of which
also affect the kernel. That required a bit of fiddling due to our patches
(#ifdef SMALL, size for ZFREE in the kernel).
There is an oob write of 32k and various other oob accesses, some info
leaks and a cloexec carelessness.
from tb@; looks good to deraadt@
In detail this is:
deflate.c, hunks 1 and 2:
[111 lines not shown]
Backport security fixes from zlib 1.4
From the 9 security fixes listed in
https://github.com/madler/zlib/releases/tag/v1.4
we already have the fix for CVE-2026-85091 in 8.0.
The remaining 8 of these are cherry-picked here for userland, 6 of which
also affect the kernel. That required a bit of fiddling due to our patches
(#ifdef SMALL, size for ZFREE in the kernel).
There is an oob write of 32k and various other oob accesses, some info
leaks and a cloexec carelessness.
from tb@; looks good to deraadt@
In detail this is:
deflate.c, hunks 1 and 2:
[111 lines not shown]
Backport security fixes from zlib 1.4
From the 9 security fixes listed in
https://github.com/madler/zlib/releases/tag/v1.4
we already have the fix for CVE-2026-85091 in 8.0.
The remaining 8 of these are cherry-picked here for userland, 6 of which
also affect the kernel. That required a bit of fiddling due to our patches
(#ifdef SMALL, size for ZFREE in the kernel).
There is an oob write of 32k and various other oob accesses, some info
leaks and a cloexec carelessness.
from tb@; looks good to deraadt@
In detail this is:
deflate.c, hunks 1 and 2:
[111 lines not shown]
zlib: fix buffer overwrite in non-blocking gzwrite
Upstream commit df84af25
from tb@
Backport security fixes from zlib 1.4
From the 9 security fixes listed in
https://github.com/madler/zlib/releases/tag/v1.4
we already have the fix for CVE-2026-85091 in 8.0.
The remaining 8 of these are cherry-picked here for userland, 6 of which
also affect the kernel. That required a bit of fiddling due to our patches
(#ifdef SMALL, size for ZFREE in the kernel).
There is an oob write of 32k and various other oob accesses, some info
leaks and a cloexec carelessness.
from tb@; looks good to deraadt@
In detail this is:
deflate.c, hunks 1 and 2:
commit 1e4178b27f458904d3d2e2256a831708912e8b1a
Author: Jason Gross <jason at theorem.dev>
Date: Mon Nov 2 20:43:28 2026 +0000
[73 lines not shown]
Use client source port instead of remote proxy port to unbreak PROXY sending
https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt
2.1. Human-readable header format (Version 1)
A valid v1 header for 2001:db8::1/1234 to example.com/80 would be
PROXY TCP6 2001:db8::1 2606:4700:10::6814:179a 1234 80
but "forward to ... port 3128 proxy-protocol v1" would send
PROXY TCP6 2001:db8::1 2606:4700:10::6814:179a 1234 3128
Fix both v1 and v2; tested against HAProxy "bind ... accept-proxy".
"ok christoph" (code author)
OK op
ec_curve_tables: silence a noisy MSVC warning
Explicitly clear the upper bits of n0 on LP32 so that we don't see
D:\a\portable\portable\crypto\ec\ec_curve_tables.h(1310,8): warning C4310: cast truncates constant value [D:\a\portable\portable\build\crypto\crypto_obj.vcxproj]
(compiling source file '../../crypto/ec/ec_curve.c')
on (almost?) every line using EC_CURVE_N0() on 32-bit Windows.
Portable regress is happy: https://github.com/libressl/portable/pull/1464
ok beck