An authfile with no users turns off authentication and ACLs
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- authentication, networking, security
Direzione di ricerca
Start with authUser in server/server.go and the permissions and ACL handling in server/server_handler.go; trace how --authfile and --auth affect authentication when the loaded user list is empty. Reproduce the reload case with the provided script and check how empty authfiles should behave. Done means an empty configured authfile rejects logins and does not grant tunnels, including after a live reload.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
When chisel server runs with --authfile and no --auth, and the authfile lists no
users ({}), the server accepts any username and password. The session also has no
ACL, so the client can open tunnels to any destination, including the server's own
loopback services, use SOCKS, and bind reverse ports.
The authfile is reloaded on change, so this also happens at runtime: an operator who
removes the last user from a running server's authfile opens the server to everyone,
with no warning.
In server/server.go authUser, if s.users.Len() == 0 { return nil, nil } lets
every login through. In server/server_handler.go, a nil sshConn.Permissions leaves
user == nil, so no remote is checked at config time and tunnelConfig.ACL is never
set. Auth-disabled is decided by how many users are loaded right now, not by whether an
authfile was configured.
Reproduction
#!/bin/sh
# usage: repro.sh <chisel binary>
BIN=$1; d=$(mktemp -d)
printf '%s\n' '{"alice:secret": ["^127.0.0.1:1$"]}' > $d/users.json
$BIN server --port 18080 --authfile $d/users.json >$d/server.log 2>&1 &
pid=$!; sleep 1
try() { timeout 3 $BIN client --auth "$1" --max-retry-count 0 http://127.0.0.1:18080 \
127.0.0.1:18081:127.0.0.1:18080 2>&1 | grep -q Connected && echo "$2: $1 ACCEPTED" || echo "$2: $1 refused"; }
try mallory:wrong "alice in authfile"
echo '{}' > $d/users.json; sleep 1
try mallory:wrong "empty authfile "
kill $pid; cat $d/server.log
Output:
alice in authfile: mallory:wrong refused
empty authfile : mallory:wrong ACCEPTED
... server: session#2: Open (user=- addr=127.0.0.1:34410 remotes=127.0.0.1:18081:127.0.0.1:18080)
Notes
- Found at
5ee6c74with an Antithesis test that rewrites the authfile under a running server while clients log in and open tunnels. - Related:
TASKS.mdnotes thatLen()==0means allow-all (the "Panic race" entry), and a
similar silent disable for--authwithout a colon, but not a reload to an empty authfile.
#171 and #549 cover removed users, not an empty file. - A possible fix: decide "auth enabled" from whether
--authfileor--authwas given,
not from the current user count, so an empty authfile refuses every login.
- Lingua principale
- Go
- Stelle
- 16.8k
- Fork
- 1.6k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di jpillora/chisel
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
-
Rebuild and release with Go 1.27.3 to distrust compromised eMudhra intermediates (CVE-2026-111943)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Release v1.12.0-rc1Forse di nuovo libera @jpillora l’ha presa 137 giorni fa e non c’è nessuna pull request aperta. Aperta
-
Packages in Need of UpdatesAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
Tutte le issue di jpillora/chisel
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
containers/gvisor-tap-vsock#796 ·
I maintainer di solito rispondono entro 2 giorni
-
external needs:triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
celestiaorg/celestia-node#5448 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Azure SAS signing uses local time instead of UTC, shifting validity window on non-UTC hostsForse già presa @huanghaoyuanhhy l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
zilliztech/milvus-backup#1418 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
projectdiscovery/nuclei#8423 ·
I maintainer di solito rispondono entro 1 giorno