Commit Graph
861 Commits
Author SHA1 Message Date
JackDoan 5edcaefa33 e2e: Back to back hybrid handshakes, and a classical attempt crossing a hybrid one 2026-10-14 12:56:12 -05:00
JackDoan bbade4dc9a Take a hybrid tunnel on msg3 even over a newer one, the initiator has committed to it 2026-10-14 12:56:12 -05:00
JackDoan cbf8146bda udp: Buffer a fragmented handshake burst in the tester, so crossing bursts cannot deadlock the e2e router 2026-10-14 12:56:12 -05:00
JackDoan 3b850c6ecf handshake/fragment: Remember answered messages, so repair fragments trailing a completed msg1 do not eat the source quota 2026-10-14 12:56:12 -05:00
JackDoan a508a4e22c Update post-quantum open items 2026-10-14 12:37:30 -05:00
JackDoan e7b2abb0b2 e2e: msg2 is 9 data fragments now 2026-10-14 12:31:59 -05:00
JackDoan 5cc53c22db Document the classical-only responder e in hybrid IX, msg2 is now 9 fragments 2026-10-14 12:27:56 -05:00
JackDoan 70e7d3f2ea Hold a pending hybrid responder locked until it is filled in 2026-10-14 11:09:18 -05:00
JackDoan 4ce04760ae Document version 3 certificates and hybrid handshakes 2026-10-14 11:08:51 -05:00
JackDoan 1e6a95df15 Test loading v3 certificates and composite keys from config 2026-10-14 11:07:01 -05:00
JackDoan 4d37a3140f nebula-cert: Make version 3 CAs, keys and certificates, and pq-extend v2 certificates in place 2026-10-14 11:06:40 -05:00
JackDoan b26c1e9c3e Run hybrid handshakes: v3 holders initiate them, responders wait for msg3, initiators resend it until confirmed 2026-10-14 11:03:04 -05:00
JackDoan 5c5254dc18 Load v3 certificates and composite keys, speak v2 messages over v3 tunnels, and match ca_sha on either CA fingerprint 2026-10-14 11:03:04 -05:00
JackDoan ab89556c5c handshake: Add ix_hybrid_mlkem1024, DefinedNet/noise hybrid IX with ML-KEM-1024 over version 3 certificates 2026-10-14 10:50:33 -05:00
JackDoan 1a8fb8d67e cert: Add version 3 certificates, a v2 certificate extended with ML-KEM-1024 or ML-DSA-87 keys and an ML-DSA-87 CA signature 2026-10-14 10:47:41 -05:00
JackDoan 73ddb56c34 Build with Go 1.27 and DefinedNet/noise, for crypto/mldsa and hybrid Noise patterns 2026-10-14 10:41:11 -05:00
JackDoan 13658b74a0 Add handshakes.pq.require, and give new paths and responsive peers the PQ attempt 2026-10-14 10:18:00 -05:00
JackDoan 22cdb0739a Demand cookies for post-quantum msg1s while under load, and reload handshakes.pq settings 2026-10-13 22:50:28 -05:00
JackDoan 45e449a591 handshake/fragment: Carry an optional cookie, with room for it reserved in every fragment 2026-10-13 22:50:28 -05:00
JackDoan a36ce25af4 Speak post-quantum handshakes over fragments, alternating with classical until one answers 2026-10-13 22:42:07 -05:00
JackDoan 2e5adfddc6 handshake: Add ix_psk2_mlkem1024, IX with an ephemeral ML-KEM-1024 exchange in the psk2 slot 2026-10-13 22:42:06 -05:00
JackDoan 31f3d6435e handshake/fragment: Carry oversized handshake messages as FEC coded fragments 2026-10-13 22:42:06 -05:00
JackDoan 8f9a631f6e handshake/fec: Systematic Cauchy Reed-Solomon erasure code over GF(2^8) 2026-10-13 22:42:06 -05:00
Ryan Huber 8a2de9b1b5 examples: set socket buffers and raise tun tx_queue (#1928)
* examples: set socket buffers and raise tun tx_queue

* examples: use the default tcp max window for socket buffers

* examples: note buffers are linux only, clarify tx_queue default

* tun: default tx_queue to 5000
2026-10-11 00:30:07 -04:00
Nate Brown a8c52f5c13 overlay: Handle routes Windows already has, and parse quoted route numbers (#1924) 2026-10-08 18:52:53 -05:00
Jack Doan 13af8dd6f3 Cap configured MTUs at 8937 so relayed sends never outgrow their buffers (#1899) 2026-10-08 15:41:08 -05:00
Nate Brown 5bb0622192 stats: Follow stats.interval on reload, interface gauges ride the capture loop (#1919) 2026-10-08 10:00:48 -05:00
Nate Brown f3705cbb67 graphite: Time out a send, and abandon it on stop (#1920) 2026-10-07 18:01:09 -05:00
Nate Brown 94be454f4f lighthouse: Recompute relays for me when relay.am_relay changes (#1917) 2026-10-07 14:06:27 -05:00
Nate Brown 5f26c1a7e5 Add a simple rate limiter with a helper to use it in logging (#1915) 2026-10-07 10:53:37 -05:00
Nate Brown d47c8c71f1 lighthouse: Send an update when the relays we advertise change on reload (#1916) 2026-10-07 10:52:42 -05:00
Nate Brown f57539a163 overlay/linux: Keep unsafe routes when a reload only changes tun.mtu (#1918) 2026-10-07 10:43:11 -05:00
John Maguire 8d8ae0f744 Disable DNS registration on the Windows tunnel adapter (#1914)
On a domain-joined Windows host the DNS Client registers every adapter's
addresses under the host name in AD DNS when "Register this connection's
addresses in DNS" is on, which is the default for a new adapter. When the
Nebula adapter registers, LAN clients that are not on the overlay resolve
the host name to its overlay IP and RDP, SMB and PowerShell Remoting to it
fail intermittently, with nothing pointing at the tunnel as the cause.
Windows registers on address assignment, periodically, and on every
ipconfig /registerdns.

Right after the wintun adapter is created and before Activate assigns any
address, write RegistrationEnabled=0, DisableDynamicUpdate=1 and
MaxNumberOfAddressesToRegister=0 under both the Tcpip and Tcpip6
Parameters\Interfaces\{GUID} keys. The adapter checkbox alone has proven
insufficient in practice, as has disabling dynamic updates alone, so all
three are set, matching what Tailscale and NetBird do. A failure to write
the keys is logged as a warning and does not fail adapter creation.
2026-10-07 11:42:08 -04:00
Matt Richardson f9b0853476 Attach a pending handshake's RemoteList when the handshake starts (#1909)
StartHandshake returned a hostinfo with no RemoteList; handleOutbound attached
one lazily on its first tick. Anything that touched the pending host before
then, notably create-tunnel -address, dereferenced nil and took the daemon
down. StartHandshake now attaches the lighthouse's list as it builds the
hostinfo. To keep the surrounding locking sound, a lighthouse now resolves a
punch target before taking the querier's RemoteList lock, and closeTunnel
deletes the host and evicts its RemoteList under a single hostmap write lock so
a completing handshake cannot land in between. The lock order, now documented
on the handshake manager mutex, is hostmap, then handshake manager, then
lighthouse, then RemoteList; no RemoteList lock is ever held across a hostmap
lookup.
2026-10-07 11:22:50 -04:00
Nate Brown d5062dacf0 lighthouse: Never block in QueryServer, drop queries when the channel is full (#1910) 2026-09-30 15:26:34 -05:00
Jack Doan 7cfa47d569 tweaks to error handling in iputil.IPv6FindUpperProtocol (#1893) 2026-09-22 15:45:01 -05:00
Caleb JasikandNate Brown e20569ce51 Let the darwin tun adopt an fd the host already configured (#1890)
newTunFromFd was a stub on darwin, so an embedder handed a utun by the OS had
no way to use it. A darwin network extension is given exactly that:
NEPacketTunnelProvider creates the device and applies addressing, mtu and
routes from its network settings, and a sandboxed extension cannot change them
afterwards. Adopting that fd means everything about moving packets is shared
with newTun and only the setup differs, so the tun tracks whether the host owns
it and leaves the system routing table and interface config alone when it does.

Co-authored-by: Nate Brown <nbrown.us@gmail.com>
2026-09-22 11:54:30 -05:00
Caleb JasikandNate Brown 9651ffdb0d Cancel the context when Main hands back no Control (#1889)
The goroutines Main starts stop only when its context does, and only a caller
holding the Control can arrange that. Cancelling solely on error left a config
test, which returns no Control and no error, with the lighthouse query worker
and a hostname resolver per dns named static host running for the life of the
process. Every embedder that validates a config in process rather than by
exec'ing pays for that on each config load, dnclient and the apple clients
included.

Co-authored-by: Nate Brown <nbrown.us@gmail.com>
2026-09-22 11:52:28 -05:00
Jack Doan 3a45c01656 Advertise underlay addresses on Android (#1881) 2026-09-21 14:59:56 -05:00
Jack Doan 019cc46a7f smoke: Prove windows honors NlMtu with a 9000 byte ping (#1873) 2026-09-21 12:59:31 -05:00
Nate Brown cf3f315cd3 IPv6FindUpperProtocol: fail closed when the extension header walk runs out of budget (#1883) 2026-09-21 12:09:51 -05:00
Wade Simmons 3fc627e08d Add script to backport a merged PR to a release branch (#1851)
* Add script to backport a merged PR to a release branch

.github/backport.sh cherry-picks a merged PR's commit onto a release
branch and opens a backport PR mirroring the shape of #1842.

- Infers the target release from the PR's milestone (v1.12.0 -> release-1.11);
  an explicit target-version argument overrides it.
- Requires a clean working tree (untracked files allowed) before starting.
- Prompts with the exact push and gh pr create commands before running them.
- Sets the new PR's milestone to the highest open v<target>.* milestone.
- Removes the needs-backport label from the original PR once the backport opens.
- Supports --continue to resume after resolving cherry-pick conflicts.

* cleanup

* just fetch all of origin

We need to ensure we have MERGE_SHA available too
2026-09-14 16:14:43 -04:00
dependabot[bot] abff1a4555 Bump Vampire/setup-wsl from 3 to 7 (#1720)
Bumps [Vampire/setup-wsl](https://github.com/vampire/setup-wsl) from 3 to 7.
- [Release notes](https://github.com/vampire/setup-wsl/releases)
- [Commits](https://github.com/vampire/setup-wsl/compare/v3...v7)

---
updated-dependencies:
- dependency-name: Vampire/setup-wsl
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-14 10:11:27 -04:00
dependabot[bot] 227134a1d5 Bump golang.org/x/net in the golang-x-dependencies group (#1876)
Bumps the golang-x-dependencies group with 1 update: [golang.org/x/net](https://github.com/golang/net).


Updates `golang.org/x/net` from 0.58.0 to 0.59.0
- [Commits](https://github.com/golang/net/compare/v0.58.0...v0.59.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.59.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-14 10:01:25 -04:00
dependabot[bot] 232bacfdd0 Bump github.com/gaissmai/bart from 0.28.0 to 0.29.0 (#1829)
Bumps [github.com/gaissmai/bart](https://github.com/gaissmai/bart) from 0.28.0 to 0.29.0.
- [Release notes](https://github.com/gaissmai/bart/releases)
- [Commits](https://github.com/gaissmai/bart/compare/v0.28.0...v0.29.0)

---
updated-dependencies:
- dependency-name: github.com/gaissmai/bart
  dependency-version: 0.29.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-14 09:39:13 -04:00
dependabot[bot] 4e1ef9cd73 Bump the golang-x-dependencies group across 1 directory with 5 updates (#1875)
Bumps the golang-x-dependencies group with 2 updates in the / directory: [golang.org/x/crypto](https://github.com/golang/crypto) and [golang.org/x/sync](https://github.com/golang/sync).


Updates `golang.org/x/crypto` from 0.54.0 to 0.57.0
- [Commits](https://github.com/golang/crypto/compare/v0.54.0...v0.57.0)

Updates `golang.org/x/net` from 0.57.0 to 0.58.0
- [Commits](https://github.com/golang/net/compare/v0.57.0...v0.58.0)

Updates `golang.org/x/sync` from 0.22.0 to 0.23.0
- [Commits](https://github.com/golang/sync/compare/v0.22.0...v0.23.0)

Updates `golang.org/x/sys` from 0.47.0 to 0.48.0
- [Commits](https://github.com/golang/sys/compare/v0.47.0...v0.48.0)

Updates `golang.org/x/term` from 0.45.0 to 0.46.0
- [Commits](https://github.com/golang/term/compare/v0.45.0...v0.46.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.57.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x-dependencies
- dependency-name: golang.org/x/net
  dependency-version: 0.58.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x-dependencies
- dependency-name: golang.org/x/sync
  dependency-version: 0.23.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x-dependencies
- dependency-name: golang.org/x/sys
  dependency-version: 0.48.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x-dependencies
- dependency-name: golang.org/x/term
  dependency-version: 0.46.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-14 09:37:37 -04:00
dependabot[bot] 614e0ea3aa Bump google.golang.org/protobuf (#1846)
Bumps the protobuf-dependencies group with 1 update in the / directory: google.golang.org/protobuf.


Updates `google.golang.org/protobuf` from 1.36.11 to 1.36.12

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-version: 1.36.12
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: protobuf-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-14 09:31:44 -04:00
dependabot[bot] 2999fc0b6a Bump github.com/stretchr/testify from 1.12.0 to 1.12.1 (#1859)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.12.0 to 1.12.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.12.0...v1.12.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-version: 1.12.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-14 09:29:03 -04:00
dependabot[bot] f474b534e1 Bump github.com/miekg/dns from 1.1.72 to 1.1.73 (#1860)
Bumps [github.com/miekg/dns](https://github.com/miekg/dns) from 1.1.72 to 1.1.73.
- [Commits](https://github.com/miekg/dns/compare/v1.1.72...v1.1.73)

---
updated-dependencies:
- dependency-name: github.com/miekg/dns
  dependency-version: 1.1.73
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-14 09:28:03 -04:00
Wade Simmons 0dc8a28d1f apply go fix for Go 1.26 (#1867)
* apply `go fix` for Go 1.26

This applies the `go fix` recommendations for go1.26

* for all of ./...
2026-09-14 09:25:35 -04:00