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,153 @@
|
||||
---
|
||||
###############################################################################
|
||||
#
|
||||
# Configuration file for the ca-hook.py SvxReflector server CA events hook
|
||||
# script.
|
||||
#
|
||||
# For the *_MAIL_TO and *_MAIL_BCC configuration variables it is possible to
|
||||
# embed the following variables inside curly braces.
|
||||
#
|
||||
# email: The email addresses included in the CSR/CRT
|
||||
#
|
||||
# For the CSR_CREATE_MAIL_SUBJECT, CSR_CREATE_MAIL_CONTENT,
|
||||
# CSR_UPDATE_MAIL_SUBJECT and CSR_UPDATE_MAIL_CONTENT configuration
|
||||
# variables it is possible to embed the following variables inside curly
|
||||
# braces.
|
||||
#
|
||||
# callsign: The callsign (Subject CN)
|
||||
# subject: The Subject DN of the CSR
|
||||
# email: The email addresses included in the CSR/CRT
|
||||
# hostname: The name of the host where this script run
|
||||
#
|
||||
# In addition to the above variables, the following ones can be embedded in the
|
||||
# CSR_SIGNED_MAIL_SUBJECT, CSR_SIGNED_MAIL_CONTENT, CRT_RENEWED_MAIL_SUBJECT
|
||||
# and CRT_RENEWED_MAIL_CONTENT configuration variables.
|
||||
#
|
||||
# serial_number: The serial number of the certificate
|
||||
# issuer: The certificate issuer Subject DN
|
||||
# not_before When the certificate is valid from
|
||||
# not_after When the certificate will expire
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
# Set to true to print the mail message instead of sending it
|
||||
EMAIL_DEBUG: true
|
||||
|
||||
# The SMTP server to send the message to
|
||||
EMAIL_SMTP_SERVER: "127.0.0.1"
|
||||
|
||||
# Use the following email sender address ("From")
|
||||
EMAIL_FROM: "SvxReflector <reflector@example.com>"
|
||||
|
||||
# Send sysop mails to the following addresses
|
||||
SYSOP_EMAIL: &SYSOP_EMAIL
|
||||
- "sysop1@example.com"
|
||||
- "sysop2@example.com"
|
||||
|
||||
# Send the CSR create emails to the following addresses
|
||||
CSR_CREATE_MAIL_TO: *SYSOP_EMAIL
|
||||
|
||||
# Send the CSR create emails to the following BCC addresses
|
||||
CSR_CREATE_MAIL_BCC:
|
||||
|
||||
# Email subject to use for CSR create notifications.
|
||||
# Comment out to suppress sending of CSR create emails.
|
||||
CSR_CREATE_MAIL_SUBJECT: "SvxReflector: CSR received from node {callsign}"
|
||||
|
||||
# Email content to use for CSR create notifications.
|
||||
# Comment out to suppress sending of CSR create emails.
|
||||
CSR_CREATE_MAIL_CONTENT: |
|
||||
Hi,
|
||||
|
||||
The reflector node {callsign} has submitted a CSR at reflector server {hostname}. Please check that the CSR is correct and then sign it.
|
||||
|
||||
Subject: {subject}
|
||||
Email: {email}
|
||||
|
||||
Regards,
|
||||
SvxReflector Server
|
||||
|
||||
|
||||
# Send the CSR update emails to the following addresses
|
||||
CSR_UPDATE_MAIL_TO: *SYSOP_EMAIL
|
||||
|
||||
# Send the CSR update emails to the following BCC addresses
|
||||
CSR_UPDATE_MAIL_BCC:
|
||||
|
||||
# Email subject to use for CSR update notifications.
|
||||
# Comment out to suppress sending of CSR update emails.
|
||||
CSR_UPDATE_MAIL_SUBJECT: "SvxReflector: CSR update received from node {callsign}"
|
||||
|
||||
# Email content to use for CSR update notifications.
|
||||
# Comment out to suppress sending of CSR update emails.
|
||||
CSR_UPDATE_MAIL_CONTENT: |
|
||||
Hi,
|
||||
|
||||
The reflector node {callsign} has submitted an updated CSR at reflector server {hostname}. Please check that the CSR is correct and then sign it.
|
||||
|
||||
Subject: {subject}
|
||||
Email: {email}
|
||||
|
||||
Regards,
|
||||
SvxReflector Server
|
||||
|
||||
|
||||
# Send the CSR signed emails to the following addresses
|
||||
CSR_SIGNED_MAIL_TO: "{email}"
|
||||
|
||||
# Send the CSR signed emails to the following BCC addresses
|
||||
CSR_SIGNED_MAIL_BCC: *SYSOP_EMAIL
|
||||
|
||||
# Email subject to use for CSR signed notifications.
|
||||
# Comment out to suppress sending of CSR signed emails.
|
||||
CSR_SIGNED_MAIL_SUBJECT: "SvxReflector: Certificate signed for node {callsign}"
|
||||
|
||||
# Email content to use for CSR signed notifications.
|
||||
# Comment out to suppress sending of CSR signed emails.
|
||||
CSR_SIGNED_MAIL_CONTENT: |
|
||||
Hi,
|
||||
|
||||
The certificate for reflector node {callsign} has been signed and is now ready for use. If this was not initiated by you, your callsign may have been hijacked by someone. In that case, please reply to this email to notify the reflector sysop.
|
||||
|
||||
Serial: {serial_number:X}
|
||||
Issuer: {issuer}
|
||||
Subject: {subject}
|
||||
Not before: {not_before}Z
|
||||
Not after: {not_after}Z
|
||||
Email: {email}
|
||||
|
||||
If everything is in order, you do not have to do anything. Your node will receive the certificate from the reflector server and will start to use it immediately.
|
||||
|
||||
Regards,
|
||||
SvxReflector Server Sysop
|
||||
|
||||
|
||||
# Send the certificate renewed emails to the following addresses
|
||||
CRT_RENEWED_MAIL_TO: *SYSOP_EMAIL
|
||||
|
||||
# Send the certificate renewed emails to the following BCC addresses
|
||||
CRT_RENEWED_MAIL_BCC:
|
||||
|
||||
# Email subject to use for certificate renew notifications.
|
||||
# Comment out to suppress sending of renew emails.
|
||||
CRT_RENEWED_MAIL_SUBJECT: "SvxReflector: Certificate renewed for node {callsign}"
|
||||
|
||||
# Email content to use for certificate renew notifications.
|
||||
# Comment out to suppress sending of CSR signed emails.
|
||||
CRT_RENEWED_MAIL_CONTENT: |
|
||||
Hi,
|
||||
|
||||
The certificate for reflector node {callsign} has been renewed and is now ready for use. Node certificates are automatically renewed when about one third of the total certificate lifetime remains.
|
||||
|
||||
Serial: {serial_number:X}
|
||||
Issuer: {issuer}
|
||||
Subject: {subject}
|
||||
Not before: {not_before}Z
|
||||
Not after: {not_after}Z
|
||||
Email: {email}
|
||||
|
||||
If everything is in order, you do not have to do anything. Your node will receive the new certificate from the reflector server and will start to use it immediately.
|
||||
|
||||
Regards,
|
||||
SvxReflector Server Sysop
|
||||
|
||||
Reference in new issue
Block a user