summaryrefslogtreecommitdiffhomepage
path: root/device/endpoint_test.go
diff options
context:
space:
mode:
authorJordan Whited <jordan@tailscale.com>2023-03-09 10:46:12 -0800
committerJason A. Donenfeld <Jason@zx2c4.com>2023-03-10 14:52:32 +0100
commit6901984f6aa6de37a7b3979134f8b29c81735861 (patch)
tree7c5cdf23474e875487eb393eac395488a3fce7db /device/endpoint_test.go
parent2fcdaf979915be4702bf8aba4a90ac3c3ae0796b (diff)
conn: ensure control message size is respected in StdNetBind
This commit re-slices received control messages in StdNetBind to the value the OS reports on a successful read. Previously, the len of this slice would always be srcControlSize, which could result in control message values leaking through a sync.Pool round trip. This is unlikely with the IP_PKTINFO socket option set successfully, but should be guarded against. Reviewed-by: James Tucker <james@tailscale.com> Signed-off-by: Jordan Whited <jordan@tailscale.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'device/endpoint_test.go')
0 files changed, 0 insertions, 0 deletions