SIGN IN SIGN UP
juanfont / headscale UNCLAIMED

An open source, self-hosted implementation of the Tailscale control server

0 0 43 Go

db: fix slice aliasing in migration tag merge

The migration at db.go:680 appends validated tags to existing tags
using append(existingTags, validatedTags...) where existingTags
aliases node.Tags. When node.Tags has spare capacity, append writes
into the shared backing array, and the subsequent slices.Sort
corrupts the original.

Clone existingTags before appending to prevent aliasing.
K
Kristoffer Dalby committed
3037e5eee0285bfdc5f34cdee718331cdb315102
Parent: 82bb433
Committed by Kristoffer Dalby <kristoffer@dalby.cc> on 4/10/2026, 12:18:56 PM