Security hardening: fix 19 of 22 vulnerabilities found in audit
Critical: - Trunk HMAC-SHA1 auth: MsgTrunkHello now carries nonce+digest, peer disconnected on secret mismatch (was loaded but never verified) High: - Pre-hello guard: reject all trunk messages before handshake completes - CSPRNG for password generator: random.choice -> secrets.choice Medium: - Path traversal protection on callsign-based file operations - Replace assert() on network-derived UDP data with error handling - HTTP server connection throttling (matching main TCP server) - try/catch on regex compilation in callsignOk()/emailOk() - Per-link trunk talker tracking (clearAllTrunkTalkers scoped to peer) - Regenerate priority nonce on each new trunk connection - Cap active TGs and trunk talkers at 10000 each - Don't reset heartbeat for unauthenticated client app messages - Fix RENEW_AFTER integer division (2/3 -> 2.0/3.0) Low: - JSON-escape HTTP method in error response - snprintf for pidfile error message - MsgAuthResponse::digest() null check on empty vector - Check unpack() return values in AsyncMsg.h vector/map/string - Replace stack VLA with std::string; reserve+push_back vs resize - Require TalkerStart before accepting trunk audio
This commit is contained in:
commit
fca7c33794
276 files changed
+73533
No files matched your search
@@ -0,0 +1,101 @@
|
||||
###################################################################
|
||||
#
|
||||
# Configuration file for the SvxReflector SvxLink conference node
|
||||
#
|
||||
###################################################################
|
||||
|
||||
[GLOBAL]
|
||||
#CFG_DIR=svxreflector.d
|
||||
TIMESTAMP_FORMAT="%c"
|
||||
LISTEN_PORT=5300
|
||||
#SQL_TIMEOUT=600
|
||||
#SQL_TIMEOUT_BLOCKTIME=60
|
||||
#CODECS=OPUS
|
||||
TG_FOR_V1_CLIENTS=999
|
||||
#LOCAL_PREFIX=1
|
||||
#RANDOM_QSY_RANGE=12399:100
|
||||
#HTTP_SRV_PORT=8080
|
||||
COMMAND_PTY=/dev/shm/reflector_ctrl
|
||||
#ACCEPT_CALLSIGN="[A-Z0-9][A-Z]{0,2}\\d[A-Z0-9]{0,3}[A-Z](?:-[A-Z0-9]{1,3})?"
|
||||
#REJECT_CALLSIGN=""
|
||||
#ACCEPT_CERT_EMAIL="\\w+(?:[-._+]\\w+)*@\\w+(?:\\.\\w+)*"
|
||||
#CERT_PKI_DIR=pki/
|
||||
#CERT_CA_BUNDLE=ca-bundle.crt
|
||||
#CERT_CA_KEYS_DIR=private/
|
||||
#CERT_CA_PENDING_CSRS_DIR=pending_csrs/
|
||||
#CERT_CA_CSRS_DIR=csrs/
|
||||
#CERT_CA_CERTS_DIR=certs/
|
||||
CERT_CA_HOOK=@SVX_SHARE_INSTALL_DIR@/ca-hook.py
|
||||
|
||||
[ROOT_CA]
|
||||
#KEYFILE=svxreflector_root_ca.key
|
||||
#CRTFILE=svxreflector_root_ca.crt
|
||||
#COMMON_NAME=SvxReflector Root CA
|
||||
#ORG_UNIT=SvxLink
|
||||
#ORG=MyOrg
|
||||
#LOCALITY=MyTown
|
||||
#STATE=StateOrProvince
|
||||
#COUNTRY=XX
|
||||
#EMAIL_ADDRESS=sysop@svxlink.example.org
|
||||
|
||||
[ISSUING_CA]
|
||||
#KEYFILE=svxreflector_issuing_ca.key
|
||||
#CSRFILE=svxreflector_issuing_ca.csr
|
||||
#CRTFILE=svxreflector_issuing_ca.crt
|
||||
#COMMON_NAME=SvxReflector Issuing CA
|
||||
#ORG_UNIT=SvxLink
|
||||
#ORG=MyOrg
|
||||
#LOCALITY=MyTown
|
||||
#STATE=StateOrProvince
|
||||
#COUNTRY=XX
|
||||
#EMAIL_ADDRESS=sysop@svxlink.example.org
|
||||
|
||||
[SERVER_CERT]
|
||||
#KEYFILE=svxreflector.key
|
||||
#CSRFILE=svxreflector.csr
|
||||
#CRTFILE=svxreflector.crt
|
||||
#COMMON_NAME=svxreflector.example.org
|
||||
#ORG_UNIT=SvxLink
|
||||
#ORG=MyOrg
|
||||
#LOCALITY=MyTown
|
||||
#STATE=StateOrProvince
|
||||
#COUNTRY=XX
|
||||
#SUBJECT_ALT_NAME=DNS:public-hostname.example.org,IP:172.17.1.42
|
||||
#EMAIL_ADDRESS=sysop@svxlink.example.org
|
||||
|
||||
[USERS]
|
||||
#SM0ABC-1=MyNodes
|
||||
#SM0ABC-2=MyNodes
|
||||
#SM3XYZ=SM3XYZ
|
||||
|
||||
[PASSWORDS]
|
||||
#MyNodes="Change this key now!"
|
||||
#SM3XYZ="A strong password"
|
||||
|
||||
#[TG#9999]
|
||||
#AUTO_QSY_AFTER=300
|
||||
#ALLOW=S[A-M]\\\\d.*|LA8PV
|
||||
#ALLOW_MONITOR=S[A-M]3.*
|
||||
#SHOW_ACTIVITY=0
|
||||
|
||||
# Trunk links to peer SvxReflector instances (prefix-based TG routing).
|
||||
#
|
||||
# Each reflector owns all TGs whose decimal representation starts with
|
||||
# LOCAL_PREFIX. For example, LOCAL_PREFIX=1 means this reflector is
|
||||
# authoritative for TGs 1, 10, 100, 1000, 12345, etc.
|
||||
#
|
||||
# Add LOCAL_PREFIX to the [GLOBAL] section, then add one [TRUNK_x] section
|
||||
# per peer. REMOTE_PREFIX declares which TG prefix the peer owns.
|
||||
#
|
||||
# Example for a two-reflector mesh:
|
||||
# Reflector A: LOCAL_PREFIX=1, [TRUNK_2] with REMOTE_PREFIX=2
|
||||
# Reflector B: LOCAL_PREFIX=2, [TRUNK_1] with REMOTE_PREFIX=1
|
||||
#
|
||||
#LOCAL_PREFIX=1
|
||||
|
||||
#[TRUNK_2]
|
||||
#HOST=reflector-b.example.com
|
||||
#PORT=5302
|
||||
#SECRET=change_this_shared_secret
|
||||
#REMOTE_PREFIX=2
|
||||
|
||||
Reference in new issue
Block a user