Exploit databaseDownload repository ZIP
GH-e0045e39e79655e846aab23a84bf8ea8
abrarkhan/g3_frameworks_av_cve-2024-0023
Sources for CVE-2024-0023
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files36
abrarkhan/g3_frameworks_av_cve-2024-0023Revision 58f6f7229c15
- ↑..Parent directory
- AAudioClientTracker.cpp
- AAudioClientTracker.h
- AAudioEndpointManager.cpp
- AAudioEndpointManager.h
- AAudioMixer.cpp
- AAudioMixer.h
- AAudioService.cpp
- AAudioService.h
- AAudioServiceEndpoint.cpp
- AAudioServiceEndpoint.h
- AAudioServiceEndpointCapture.cpp
- AAudioServiceEndpointCapture.h
- AAudioServiceEndpointMMAP.cpp
- AAudioServiceEndpointMMAP.h
- AAudioServiceEndpointPlay.cpp
- AAudioServiceEndpointPlay.h
- AAudioServiceEndpointShared.cpp
- AAudioServiceEndpointShared.h
- AAudioServiceStreamBase.cpp
- AAudioServiceStreamBase.h
- AAudioServiceStreamMMAP.cpp
- AAudioServiceStreamMMAP.h
- AAudioServiceStreamShared.cpp
- AAudioServiceStreamShared.h
- AAudioStreamTracker.cpp
- AAudioStreamTracker.h
- AAudioThread.cpp
- AAudioThread.h
- Android.mk
- OWNERS
- SharedMemoryProxy.cpp
- SharedMemoryProxy.h
- SharedRingBuffer.cpp
- SharedRingBuffer.h
- TimestampScheduler.cpp
- TimestampScheduler.h
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
services/oboeservice/SharedRingBuffer.h
Text · 2,080 bytes/*
* Copyright (C) 2016 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.
*/
#ifndef AAUDIO_SHARED_RINGBUFFER_H
#define AAUDIO_SHARED_RINGBUFFER_H
#include <android-base/unique_fd.h>
#include <stdint.h>
#include <cutils/ashmem.h>
#include <sys/mman.h>
#include "fifo/FifoBuffer.h"
#include "binding/RingBufferParcelable.h"
#include "binding/AudioEndpointParcelable.h"
namespace aaudio {
// Determine the placement of the counters and data in shared memory.
#define SHARED_RINGBUFFER_READ_OFFSET 0
#define SHARED_RINGBUFFER_WRITE_OFFSET sizeof(fifo_counter_t)
#define SHARED_RINGBUFFER_DATA_OFFSET (SHARED_RINGBUFFER_WRITE_OFFSET + sizeof(fifo_counter_t))
/**
* Atomic FIFO that uses shared memory.
*/
class SharedRingBuffer {
public:
SharedRingBuffer() {}
virtual ~SharedRingBuffer();
aaudio_result_t allocate(android::fifo_frames_t bytesPerFrame, android::fifo_frames_t capacityInFrames);
void fillParcelable(AudioEndpointParcelable &endpointParcelable,
RingBufferParcelable &ringBufferParcelable);
android::FifoBuffer * getFifoBuffer() {
return mFifoBuffer;
}
private:
android::base::unique_fd mFileDescriptor;
android::FifoBuffer *mFifoBuffer = nullptr;
uint8_t *mSharedMemory = nullptr;
int32_t mSharedMemorySizeInBytes = 0;
int32_t mDataMemorySizeInBytes = 0;
android::fifo_frames_t mCapacityInFrames = 0;
};
} /* namespace aaudio */
#endif //AAUDIO_SHARED_RINGBUFFER_H