Exploit databaseDownload repository ZIP
GH-9bef12607fbc6142c2d2e0da5832840c
nanopathi/framework_base_aosp10_r33_cve-2021-0339
Sources for CVE-2021-0339
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files45
nanopathi/framework_base_aosp10_r33_cve-2021-0339Revision 14c4f070663c
- ↑..Parent directory
- report/
- tree/
- ByteStream.java
- Usb10ACHeader.java
- Usb10ACInputTerminal.java
- Usb10ACMixerUnit.java
- Usb10ACOutputTerminal.java
- Usb10ASFormatI.java
- Usb10ASFormatII.java
- Usb10ASGeneral.java
- Usb20ACHeader.java
- Usb20ACInputTerminal.java
- Usb20ACMixerUnit.java
- Usb20ACOutputTerminal.java
- Usb20ASFormatI.java
- Usb20ASFormatII.java
- Usb20ASFormatIIEx.java
- Usb20ASFormatIII.java
- Usb20ASGeneral.java
- UsbACAudioControlEndpoint.java
- UsbACAudioStreamEndpoint.java
- UsbACEndpoint.java
- UsbACFeatureUnit.java
- UsbACHeaderInterface.java
- UsbACInterface.java
- UsbACInterfaceUnparsed.java
- UsbACMidiEndpoint.java
- UsbACMixerUnit.java
- UsbACSelectorUnit.java
- UsbACTerminal.java
- UsbASFormat.java
- UsbBinaryParser.java
- UsbConfigDescriptor.java
- UsbDescriptor.java
- UsbDescriptorParser.java
- UsbDeviceDescriptor.java
- UsbEndpointDescriptor.java
- UsbHIDDescriptor.java
- UsbInterfaceAssoc.java
- UsbInterfaceDescriptor.java
- UsbMSMidiHeader.java
- UsbMSMidiInputJack.java
- UsbMSMidiOutputJack.java
- UsbTerminalTypes.java
- UsbUnknown.java
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
services/usb/java/com/android/server/usb/descriptors/Usb10ACHeader.java
Java · 3,216 bytes/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed 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 com.android.server.usb.descriptors;
import com.android.server.usb.descriptors.report.ReportCanvas;
/**
* @hide
* An audio class-specific Interface Header.
* see audio10.pdf section 4.3.2
*/
public final class Usb10ACHeader extends UsbACHeaderInterface {
private static final String TAG = "Usb10ACHeader";
private byte mNumInterfaces = 0; // 7:1 The number of AudioStreaming and MIDIStreaming
// interfaces in the Audio Interface Collection to which this
// AudioControl interface belongs: n
private byte[] mInterfaceNums = null; // 8:n List of Audio/MIDI streaming interface
// numbers associate with this endpoint
private byte mControls; // Vers 2.0 thing
public Usb10ACHeader(int length, byte type, byte subtype, int subclass, int spec) {
super(length, type, subtype, subclass, spec);
}
public byte getNumInterfaces() {
return mNumInterfaces;
}
public byte[] getInterfaceNums() {
return mInterfaceNums;
}
public byte getControls() {
return mControls;
}
@Override
public int parseRawDescriptors(ByteStream stream) {
mTotalLength = stream.unpackUsbShort();
if (mADCRelease >= 0x200) {
mControls = stream.getByte();
} else {
mNumInterfaces = stream.getByte();
mInterfaceNums = new byte[mNumInterfaces];
for (int index = 0; index < mNumInterfaces; index++) {
mInterfaceNums[index] = stream.getByte();
}
}
return mLength;
}
@Override
public void report(ReportCanvas canvas) {
super.report(canvas);
canvas.openList();
int numInterfaces = getNumInterfaces();
StringBuilder sb = new StringBuilder();
sb.append("" + numInterfaces + " Interfaces");
if (numInterfaces > 0) {
sb.append(" [");
byte[] interfaceNums = getInterfaceNums();
if (interfaceNums != null) {
for (int index = 0; index < numInterfaces; index++) {
sb.append("" + interfaceNums[index]);
if (index < numInterfaces - 1) {
sb.append(" ");
}
}
}
sb.append("]");
}
canvas.writeListItem(sb.toString());
canvas.writeListItem("Controls: " + ReportCanvas.getHexString(getControls()));
canvas.closeList();
}
}