Remove UDP crypto secrets from logs

This commit is contained in:
Brandon McGinty (chatgpt)
2026-08-09 14:20:42 -04:00
committed by Brandon McGinty
parent 6ab37b18d8
commit 12dfa562d2
3 changed files with 4 additions and 13 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ vendored Mumble C++ source were not treated as files to modify.
Priority 0: security and crashers
---------------------------------
1. UDP crypto secrets are logged
[x] 1. UDP crypto secrets are logged
Files: gumble/gumble/udp15.go, gumble/gumble/crypt.go
Both crypto setup paths log the AES key and IV/nonce material at debug
level. Anyone who obtains debug logs and a packet capture can decrypt
+1 -6
View File
@@ -4,7 +4,6 @@ import (
"crypto/aes"
"crypto/cipher"
"encoding/binary"
"encoding/hex"
"errors"
"sync"
@@ -254,11 +253,7 @@ func (cs *cryptState) setup(key, iv []byte) error {
cs.initialized = true
if log.Enabled(log.LevelDebug) {
log.Debug("cryptState setup: key=%s iv=%s encIV=%s nonce_prefix=%s",
hex.EncodeToString(cs.key[:]),
hex.EncodeToString(iv),
hex.EncodeToString(encIV[:]),
hex.EncodeToString(cs.nonce[:]))
log.Debug("cryptState setup complete: key_len=%d iv_len=%d", len(key), len(iv))
}
return nil
+2 -6
View File
@@ -4,7 +4,6 @@ import (
"bytes"
"crypto/aes"
"encoding/binary"
"encoding/hex"
"errors"
"math"
"sync"
@@ -219,10 +218,7 @@ func (cs *cryptState15) setup15(key, clientNonce, serverNonce []byte) error {
cs.initialized = true
if log.Enabled(log.LevelDebug) {
log.Debug("cryptState15 setup: key=%s encryptIV=%s decryptIV=%s",
hex.EncodeToString(cs.key[:]),
hex.EncodeToString(cs.encryptIV[:]),
hex.EncodeToString(cs.decryptIV[:]))
log.Debug("cryptState15 setup complete: key_len=%d nonce_len=%d", len(key), len(clientNonce))
}
return nil
@@ -648,7 +644,7 @@ func (c *Client) HandleUDPPacket15(packet []byte, pktNum uint64) {
}
if !c.udpFirstRecv.Swap(true) && log.Enabled(log.LevelDebug) {
log.Debug("UDP15 #%d: first packet received! hex=%s", pktNum, hex.EncodeToString(packet))
log.Debug("UDP15 #%d: first packet received (%d bytes)", pktNum, len(packet))
}
c.udpMu.RLock()