Exploit databaseDownload repository ZIP
GH-9a497cc26994d431b276e9e3b7a8f75c
satheesh575555/linux-4.19.72_cve-2023-0386
Sources for CVE-2023-0386
19 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files134
satheesh575555/linux-4.19.72_cve-2023-0386Revision ef9a4a9fbf2b
- ↑..Parent directory
- acpi/
- apic/
- cpu/
- fpu/
- kprobes/
- .gitignore
- Makefile
- alternative.c
- amd_gart_64.c
- amd_nb.c
- apb_timer.c
- aperture_64.c
- apm_32.c
- asm-offsets.c
- asm-offsets_32.c
- asm-offsets_64.c
- audit_64.c
- bootflag.c
- check.c
- cpuid.c
- crash.c
- crash_dump_32.c
- crash_dump_64.c
- devicetree.c
- doublefault.c
- dumpstack.c
- dumpstack_32.c
- dumpstack_64.c
- e820.c
- early-quirks.c
- early_printk.c
- ebda.c
- eisa.c
- espfix_64.c
- ftrace.c
- ftrace_32.S
- ftrace_64.S
- head32.c
- head64.c
- head_32.S
- head_64.S
- hpet.c
- hw_breakpoint.c
- i8237.c
- i8253.c
- i8259.c
- idt.c
- io_delay.c
- ioport.c
- irq.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
arch/x86/kernel/resource.c
C · 1,205 bytes// SPDX-License-Identifier: GPL-2.0
#include <linux/ioport.h>
#include <asm/e820/api.h>
static void resource_clip(struct resource *res, resource_size_t start,
resource_size_t end)
{
resource_size_t low = 0, high = 0;
if (res->end < start || res->start > end)
return; /* no conflict */
if (res->start < start)
low = start - res->start;
if (res->end > end)
high = res->end - end;
/* Keep the area above or below the conflict, whichever is larger */
if (low > high)
res->end = start - 1;
else
res->start = end + 1;
}
static void remove_e820_regions(struct resource *avail)
{
int i;
struct e820_entry *entry;
for (i = 0; i < e820_table->nr_entries; i++) {
entry = &e820_table->entries[i];
resource_clip(avail, entry->addr,
entry->addr + entry->size - 1);
}
}
void arch_remove_reservations(struct resource *avail)
{
/*
* Trim out BIOS area (high 2MB) and E820 regions. We do not remove
* the low 1MB unconditionally, as this area is needed for some ISA
* cards requiring a memory range, e.g. the i82365 PCMCIA controller.
*/
if (avail->flags & IORESOURCE_MEM) {
resource_clip(avail, BIOS_ROM_BASE, BIOS_ROM_END);
remove_e820_regions(avail);
}
}