NTCP2: On inbound MSB check fail,
Some checks failed
Java CI / build (push) Failing after 3s
Java CI / javadoc-latest (push) Failing after 6s
Java CI / build-java7 (push) Failing after 6s
Dockerhub / docker (push) Failing after 25s
Java with IzPack Snapshot Setup / setup (push) Failing after 14s
Daily Workflow / daily-job (push) Failing after 3s
Daily Workflow / javadoc-latest (push) Failing after 6s
Daily Workflow / build-java7 (push) Failing after 6s
Some checks failed
Java CI / build (push) Failing after 3s
Java CI / javadoc-latest (push) Failing after 6s
Java CI / build-java7 (push) Failing after 6s
Dockerhub / docker (push) Failing after 25s
Java with IzPack Snapshot Setup / setup (push) Failing after 14s
Daily Workflow / daily-job (push) Failing after 3s
Daily Workflow / javadoc-latest (push) Failing after 6s
Daily Workflow / build-java7 (push) Failing after 6s
ban IP and do probing resistance, as on AEAD fail
This commit is contained in:
@ -304,7 +304,17 @@ class InboundEstablishState extends EstablishBase implements NTCP2Payload.Payloa
|
||||
}
|
||||
// fast MSB check for key < 2^255
|
||||
if ((_X[KEY_SIZE - 1] & 0x80) != 0) {
|
||||
fail("Bad PK msg 1");
|
||||
// same probing resistance strategy as below
|
||||
_padlen1 = _context.random().nextInt(PADDING1_FAIL_MAX) - src.remaining();
|
||||
if (_padlen1 > 0) {
|
||||
if (_log.shouldWarn())
|
||||
_log.warn("Bad PK msg 1, X = " + Base64.encode(_X, 0, KEY_SIZE) + " with " + src.remaining() +
|
||||
" more bytes, waiting for " + _padlen1 + " more bytes");
|
||||
changeState(State.IB_NTCP2_READ_RANDOM);
|
||||
} else {
|
||||
fail("Bad PK msg 1, X = " + Base64.encode(_X, 0, KEY_SIZE) + " remaining = " + src.remaining());
|
||||
}
|
||||
_transport.getPumper().blockIP(_con.getRemoteIP());
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user