Exploit databaseDownload repository ZIP
GH-2a948f90f898feb056ccc5d3755229bf
rusakovichma/tomcat-embed-core-9.0.31-cve-2020-11996
Sources for CVE-2020-11996
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files41
rusakovichma/tomcat-embed-core-9.0.31-cve-2020-11996Revision 7e3677b346d6
- ↑..Parent directory
- AbstractStream.java
- ByteUtil.java
- ConnectionException.java
- ConnectionSettingsBase.java
- ConnectionSettingsLocal.java
- ConnectionSettingsRemote.java
- Constants.java
- Flags.java
- FrameType.java
- HPackHuffman.java
- HeaderSink.java
- Hpack.java
- HpackDecoder.java
- HpackEncoder.java
- HpackException.java
- Http2AsyncParser.java
- Http2AsyncUpgradeHandler.java
- Http2Error.java
- Http2Exception.java
- Http2OutputBuffer.java
- Http2Parser.java
- Http2Protocol.java
- Http2UpgradeHandler.java
- LocalStrings.properties
- LocalStrings_cs.properties
- LocalStrings_de.properties
- LocalStrings_es.properties
- LocalStrings_fr.properties
- LocalStrings_ja.properties
- LocalStrings_ko.properties
- LocalStrings_pt_BR.properties
- LocalStrings_ru.properties
- LocalStrings_zh_CN.properties
- SendfileData.java
- Setting.java
- Stream.java
- StreamException.java
- StreamProcessor.java
- StreamRunnable.java
- StreamStateMachine.java
- WindowAllocationManager.java
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
java/org/apache/coyote/http2/ConnectionSettingsLocal.java
Java · 3,590 bytes/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.coyote.http2;
import java.util.Map;
/**
* Represents the local connection settings i.e. the settings the client is
* expected to use when communicating with the server. There will be a delay
* between calling a setter and the setting taking effect at the client. When a
* setter is called, the new value is added to the set of pending settings. Once
* the ACK is received, the new value is moved to the current settings. While
* waiting for the ACK, the getters will return the most lenient / generous /
* relaxed of the current setting and the pending setting. This class does not
* validate the values passed to the setters. If an invalid value is used the
* client will respond (almost certainly by closing the connection) as defined
* in the HTTP/2 specification.
*/
class ConnectionSettingsLocal extends ConnectionSettingsBase<IllegalArgumentException> {
private static final String ENDPOINT_NAME = "Local(client->server)";
private boolean sendInProgress = false;
ConnectionSettingsLocal(String connectionId) {
super(connectionId);
}
@Override
final synchronized void set(Setting setting, Long value) {
checkSend();
if (current.get(setting).longValue() == value.longValue()) {
pending.remove(setting);
} else {
pending.put(setting, value);
}
}
final synchronized byte[] getSettingsFrameForPending() {
checkSend();
int payloadSize = pending.size() * 6;
byte[] result = new byte[9 + payloadSize];
ByteUtil.setThreeBytes(result, 0, payloadSize);
result[3] = FrameType.SETTINGS.getIdByte();
// No flags
// Stream is zero
// Payload
int pos = 9;
for (Map.Entry<Setting,Long> setting : pending.entrySet()) {
ByteUtil.setTwoBytes(result, pos, setting.getKey().getId());
pos += 2;
ByteUtil.setFourBytes(result, pos, setting.getValue().longValue());
pos += 4;
}
sendInProgress = true;
return result;
}
final synchronized boolean ack() {
if (sendInProgress) {
sendInProgress = false;
current.putAll(pending);
pending.clear();
return true;
} else {
return false;
}
}
private void checkSend() {
if (sendInProgress) {
// Coding error. No need for i18n
throw new IllegalStateException();
}
}
@Override
final void throwException(String msg, Http2Error error) throws IllegalArgumentException {
throw new IllegalArgumentException(msg);
}
@Override
final String getEndpointName() {
return ENDPOINT_NAME;
}
}