[Midnightbsd-cvs] [MidnightBSD/src] 165b47: wg: check for crypto operation errors (CVE-2026-58...
Lucas Holt
noreply at github.com
Fri Jul 31 00:15:46 EDT 2026
Branch: refs/heads/stable/4.0
Home: https://github.com/MidnightBSD/src
Commit: 165b4746c831ecde2770fc99daabb16c6e685e82
https://github.com/MidnightBSD/src/commit/165b4746c831ecde2770fc99daabb16c6e685e82
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-07-31 (Fri, 31 Jul 2026)
Changed paths:
M UPDATING
M etc/mtree/BSD.tests.dist
M sys/dev/wg/wg_crypto.c
M sys/opencrypto/crypto.c
M sys/opencrypto/cryptodev.h
M tests/sys/net/Makefile
A tests/sys/net/wg/Makefile
A tests/sys/net/wg/if_wg_nojail.sh
Log Message:
-----------
wg: check for crypto operation errors (CVE-2026-58085)
After dispatching a decrypt operation to OCF, wg(4) only checked the
return value of crypto_dispatch(), not the result of the operation
itself, so packets with an invalid Poly1305 authentication tag were
silently accepted. A remote attacker able to send UDP packets to a
WireGuard endpoint, and able to guess the bounds of the receiver's
replay window, could inject forged or modified transport data packets
into the tunnel; an attacker able to intercept traffic could modify
the ciphertext and authenticated data undetected.
Propagate crp_etype from both the encrypt and decrypt paths. Since
the dispatch code assumes synchronous OCF sessions by design, also
reject a created session that is not synchronous; software sessions
are always synchronous in practice, so this should be a nop.
Add CRYPTO_SESS_SYNC() to <opencrypto/cryptodev.h>, an OCF fail point
to inject decryption failures, and a regression test exercising a bad
decrypt over a wg(4) tunnel.
Obtained from: FreeBSD (4cb888c9ec4b, 825c6f45b147)
Security: FreeBSD-SA-26:52.if_wg
Security: CVE-2026-58085
AI-Assisted-by: Claude Opus 5 (1M context) <noreply at anthropic.com>
Signed-off-by: Lucas Holt <luke at foolishgames.com>
(cherry picked from commit eb07f298f03498b2e6e48c3b266b1338cd56c1a1)
To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/src/settings/notifications
More information about the Midnightbsd-cvs
mailing list