[M-1..M-5] MAC identity weaknesses — client-declared identity, shared fallback bucket, normalization gap, loopback XFF trust
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 12/100
Línea de trabajo
Start by checking whether each finding still reproduces on upstream main: the quote-to-MAC binding in lightning.go (around lines 159-169), ValidateMACAddress in utils.go:26, net.ParseMAC in valve.go:48, and getIP in main.go (around lines 923-941). The fix needs a design decision on binding payments to the ARP-resolved MAC, so it is not a first-timer task. Done means each of M-1 to M-4 is confirmed or closed with evidence.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Migrated from Amperstrand/tollgate-module-basic-go#80 as part of the fork retirement — OpenTollGate/tollgate-module-basic-go is the single source of truth; the fork issue carries the original discussion and any lab evidence. Retirement plan: #758.]
CONSOLIDATED ISSUE covering multiple MAC tracking weaknesses:
M-1 (High, functional/security hybrid): The MAC is a fully client-declared identity. ?mac=/body mac is accepted unvalidated (beyond format) on every payment path; quote↔MAC binding is enforced (lightning.go:159-169) but the bound value is attacker-declared. Pay-for-anyone's-MAC is possible (gifting/session-extension).
M-2 (Medium): Fallback MAC bucket. Clients missing from dhcp.leases AND ARP (static IPs, expired entries) all share session key 00:00:00:00:00:00: allotments pool, usage attribution conflates payers, ndsctl auth 00:00:00:00:00:00 fails for a non-existent client → the payer's token is consumed with no grantable session.
M-3 (Low): MAC normalization gap. ValidateMACAddress (utils.go:26) accepts hyphen/dot/bare-hex formats that map to different session-map keys than the colon-lowercase form from getMacAddress; net.ParseMAC (valve.go:48) rejects bare-hex → grant fails at valve after session mutation. NDS passes uppercase colon-form while dhcp.leases is lowercase — mixed-case keys for the same device.
M-4 (Low): Loopback XFF trust. getIP (main.go:923-941) honors X-Real-Ip/X-Forwarded-For only from loopback peers — any on-router forwarder makes /balance, /usage attribution and rate-limit bucketing spoofable.
M-5 (negative note): No MAC→shell injection found. Every sink is argv-exec behind net.ParseMAC or hex-regex validation.
Fix: Bind payments to ARP-resolved MAC where possible; normalize MAC formats consistently; validate XFF headers more strictly.
Evidence: /home/ubuntu/src/tollgate_audit_report_2026-08-26.md §5, lines 78-82; §7, line 150
Migrated 2026-10-09. Applicability to current upstream main (4614ac2, post-rc1) was not re-verified during migration — confirming whether the finding still reproduces upstream is this issue's first task.
- Lenguaje dominante
- Go
- Estrellas
- 12
- Forks
- 14
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 201
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de OpenTollGate/tollgate-module-basic-go
-
changelog: dependency-security sweep missing from [Unreleased] [Amperstrand fork #105 review debt]Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
OpenTollGate/tollgate-module-basic-go#1055 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
OpenTollGate/tollgate-module-basic-go#1027 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
OpenTollGate/tollgate-module-basic-go#1026 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
OpenTollGate/tollgate-module-basic-go#833 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
OpenTollGate/tollgate-module-basic-go#813 ·
Los mantenedores suelen responder en 1 día
Todos los issues de OpenTollGate/tollgate-module-basic-go
Issues similares
-
Project submission:Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
slavakurilyak/awesome-ai-agents#845 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
JakeChampion/lang#13132 ·
Los mantenedores suelen responder en 1 día
-
[BUG] deploy.restart_policy without condition drops the restart policyPosiblemente ocupada @akshat-lakhera la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
docker/compose#14383 · 1 comentario ·
Los mantenedores suelen responder en 1 día