Exploit databaseDownload repository ZIP
GH-b6f78b211ff4ea5e7b3ebffe1f088758
abrarkhan/linux-4.19.72_cve-2020-24490
Sources for CVE-2020-24490
5 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files81
abrarkhan/linux-4.19.72_cve-2020-24490Revision aa3f6929b62b
- ↑..Parent directory
- .gitignore
- Makefile
- asm-offsets.c
- audit.c
- binfmt_loader.c
- bugs.c
- console.c
- core_apecs.c
- core_cia.c
- core_irongate.c
- core_lca.c
- core_marvel.c
- core_mcpcia.c
- core_polaris.c
- core_t2.c
- core_titan.c
- core_tsunami.c
- core_wildfire.c
- entry.S
- err_common.c
- err_ev6.c
- err_ev7.c
- err_impl.h
- err_marvel.c
- err_titan.c
- es1888.c
- gct.c
- head.S
- io.c
- irq.c
- irq_alpha.c
- irq_i8259.c
- irq_impl.h
- irq_pyxis.c
- irq_srm.c
- machvec_impl.h
- module.c
- osf_sys.c
- pc873xx.c
- pc873xx.h
- pci-noop.c
- pci-sysfs.c
- pci.c
- pci_impl.h
- pci_iommu.c
- perf_event.c
- process.c
- proto.h
- ptrace.c
- rtc.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
arch/alpha/kernel/pc873xx.c
C · 1,732 bytes// SPDX-License-Identifier: GPL-2.0
#include <linux/ioport.h>
#include <asm/io.h>
#include "pc873xx.h"
static unsigned pc873xx_probelist[] = {0x398, 0x26e, 0};
static char *pc873xx_names[] = {
"PC87303", "PC87306", "PC87312", "PC87332", "PC87334"
};
static unsigned int base, model;
unsigned int __init pc873xx_get_base()
{
return base;
}
char *__init pc873xx_get_model()
{
return pc873xx_names[model];
}
static unsigned char __init pc873xx_read(unsigned int base, int reg)
{
outb(reg, base);
return inb(base + 1);
}
static void __init pc873xx_write(unsigned int base, int reg, unsigned char data)
{
unsigned long flags;
local_irq_save(flags);
outb(reg, base);
outb(data, base + 1);
outb(data, base + 1); /* Must be written twice */
local_irq_restore(flags);
}
int __init pc873xx_probe(void)
{
int val, index = 0;
while ((base = pc873xx_probelist[index++])) {
if (request_region(base, 2, "Super IO PC873xx") == NULL)
continue;
val = pc873xx_read(base, REG_SID);
if ((val & 0xf0) == 0x10) {
model = PC87332;
break;
} else if ((val & 0xf8) == 0x70) {
model = PC87306;
break;
} else if ((val & 0xf8) == 0x50) {
model = PC87334;
break;
} else if ((val & 0xf8) == 0x40) {
model = PC87303;
break;
}
release_region(base, 2);
}
return (base == 0) ? -1 : 1;
}
void __init pc873xx_enable_epp19(void)
{
unsigned char data;
printk(KERN_INFO "PC873xx enabling EPP v1.9\n");
data = pc873xx_read(base, REG_PCR);
pc873xx_write(base, REG_PCR, (data & 0xFC) | 0x02);
}
void __init pc873xx_enable_ide(void)
{
unsigned char data;
printk(KERN_INFO "PC873xx enabling IDE interrupt\n");
data = pc873xx_read(base, REG_FER);
pc873xx_write(base, REG_FER, data | 0x40);
}