K3os: Security vulnerability: Password login is enabled on the ssh server

Created on 6 Nov 2019  路  3Comments  路  Source: rancher/k3os

I've recently encountered major security flaw in the k3os configuration. By default ssh accepts the password login to the rancher user.

aresecurity

Most helpful comment

@majkrzak this can be easily overridden with either a run_cmd kernel parameter or entry in the config.yaml

kernel param: run_cmd="echo PasswordAuthentication no >> /etc/ssh/sshd_config"

that said, it might make more sense to flip the default behavior to turn off password auth without an explicit kernel param or config.yaml entry

All 3 comments

For security issue please send to [email protected].

Can you further explain what the issue is? If you boot k3os live from the ISO the password is hardcoded to "rancher" and SSH will accept the login. For an installed system the password should be what you have set it to, either ssh key or password.

Is your issue regarding the live CD or an installed system?

Technically both, cause ssh server accepts the password login by default, so you are able to login with both ssh key or password.

@majkrzak this can be easily overridden with either a run_cmd kernel parameter or entry in the config.yaml

kernel param: run_cmd="echo PasswordAuthentication no >> /etc/ssh/sshd_config"

that said, it might make more sense to flip the default behavior to turn off password auth without an explicit kernel param or config.yaml entry

Was this page helpful?
0 / 5 - 0 ratings