OpenBSD CVS

CVS log for src/usr.bin/ssh/sshd-session.c


[BACK] Up to [local] / src / usr.bin / ssh

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.3 / (download) - annotate - [select for diffs], Thu Jun 6 17:15:25 2024 UTC (2 hours, 57 minutes ago) by djm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +9 -6 lines
Diff to previous 1.2 (colored)


Add a facility to sshd(8) to penalise particular problematic client
behaviours, controlled by two new sshd_config(5) options:
PerSourcePenalties and PerSourcePenaltyExemptList.

When PerSourcePenalties are enabled, sshd(8) will monitor the exit
status of its child pre-auth session processes. Through the exit
status, it can observe situations where the session did not
authenticate as expected. These conditions include when the client
repeatedly attempted authentication unsucessfully (possibly indicating
an attack against one or more accounts, e.g. password guessing), or
when client behaviour caused sshd to crash (possibly indicating
attempts to exploit sshd).

When such a condition is observed, sshd will record a penalty of some
duration (e.g. 30 seconds) against the client's address. If this time
is above a minimum threshold specified by the PerSourcePenalties, then
connections from the client address will be refused (along with any
others in the same PerSourceNetBlockSize CIDR range).

Repeated offenses by the same client address will accrue greater
penalties, up to a configurable maximum. A PerSourcePenaltyExemptList
option allows certain address ranges to be exempt from all penalties.

We hope these options will make it significantly more difficult for
attackers to find accounts with weak/guessable passwords or exploit
bugs in sshd(8) itself.

PerSourcePenalties is off by default, but we expect to enable it
automatically in the near future.

much feedback markus@ and others, ok markus@

Revision 1.2 / (download) - annotate - [select for diffs], Fri May 17 02:39:11 2024 UTC (2 weeks, 6 days ago) by jsg
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

spelling; ok djm@

Revision 1.1 / (download) - annotate - [select for diffs], Fri May 17 00:30:24 2024 UTC (2 weeks, 6 days ago) by djm
Branch: MAIN

Start the process of splitting sshd into separate binaries. This step
splits sshd into a listener and a session binary. More splits are
planned.

After this changes, the listener binary will validate the configuration,
load the hostkeys, listen on port 22 and manage MaxStartups only. All
session handling will be performed by a new sshd-session binary that the
listener fork+execs.

This reduces the listener process to the minimum necessary and sets us
up for future work on the sshd-session binary.

feedback/ok markus@ deraadt@

NB. if you're updating via source, please restart sshd after installing,
otherwise you run the risk of locking yourself out.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.