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 files92
satheesh575555/linux-4.19.72_cve-2023-0386Revision ef9a4a9fbf2b
- ↑..Parent directory
- Kconfig
- Makefile
- acer-wireless.c
- acer-wmi.c
- acerhdf.c
- alienware-wmi.c
- amilo-rfkill.c
- apple-gmux.c
- asus-laptop.c
- asus-nb-wmi.c
- asus-wireless.c
- asus-wmi.c
- asus-wmi.h
- classmate-laptop.c
- compal-laptop.c
- dell-laptop.c
- dell-rbtn.c
- dell-rbtn.h
- dell-smbios-base.c
- dell-smbios-smm.c
- dell-smbios-wmi.c
- dell-smbios.h
- dell-smo8800.c
- dell-wmi-aio.c
- dell-wmi-descriptor.c
- dell-wmi-descriptor.h
- dell-wmi-led.c
- dell-wmi.c
- eeepc-laptop.c
- eeepc-wmi.c
- fujitsu-laptop.c
- fujitsu-tablet.c
- gpd-pocket-fan.c
- hdaps.c
- hp-wireless.c
- hp-wmi.c
- hp_accel.c
- i2c-multi-instantiate.c
- ibm_rtl.c
- ideapad-laptop.c
- intel-hid.c
- intel-rst.c
- intel-smartconnect.c
- intel-vbtn.c
- intel-wmi-thunderbolt.c
- intel_atomisp2_pm.c
- intel_bxtwc_tmu.c
- intel_cht_int33fe.c
- intel_chtdc_ti_pwrbtn.c
- intel_int0002_vgpio.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
drivers/platform/x86/pvpanic.c
C · 2,913 bytes/*
* pvpanic.c - pvpanic Device Support
*
* Copyright (C) 2013 Fujitsu.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/acpi.h>
MODULE_AUTHOR("Hu Tao <[email protected]>");
MODULE_DESCRIPTION("pvpanic device driver");
MODULE_LICENSE("GPL");
static int pvpanic_add(struct acpi_device *device);
static int pvpanic_remove(struct acpi_device *device);
static const struct acpi_device_id pvpanic_device_ids[] = {
{ "QEMU0001", 0 },
{ "", 0 },
};
MODULE_DEVICE_TABLE(acpi, pvpanic_device_ids);
#define PVPANIC_PANICKED (1 << 0)
static u16 port;
static struct acpi_driver pvpanic_driver = {
.name = "pvpanic",
.class = "QEMU",
.ids = pvpanic_device_ids,
.ops = {
.add = pvpanic_add,
.remove = pvpanic_remove,
},
.owner = THIS_MODULE,
};
static void
pvpanic_send_event(unsigned int event)
{
outb(event, port);
}
static int
pvpanic_panic_notify(struct notifier_block *nb, unsigned long code,
void *unused)
{
pvpanic_send_event(PVPANIC_PANICKED);
return NOTIFY_DONE;
}
static struct notifier_block pvpanic_panic_nb = {
.notifier_call = pvpanic_panic_notify,
.priority = 1, /* let this called before broken drm_fb_helper */
};
static acpi_status
pvpanic_walk_resources(struct acpi_resource *res, void *context)
{
switch (res->type) {
case ACPI_RESOURCE_TYPE_END_TAG:
return AE_OK;
case ACPI_RESOURCE_TYPE_IO:
port = res->data.io.minimum;
return AE_OK;
default:
return AE_ERROR;
}
}
static int pvpanic_add(struct acpi_device *device)
{
int ret;
ret = acpi_bus_get_status(device);
if (ret < 0)
return ret;
if (!device->status.enabled || !device->status.functional)
return -ENODEV;
acpi_walk_resources(device->handle, METHOD_NAME__CRS,
pvpanic_walk_resources, NULL);
if (!port)
return -ENODEV;
atomic_notifier_chain_register(&panic_notifier_list,
&pvpanic_panic_nb);
return 0;
}
static int pvpanic_remove(struct acpi_device *device)
{
atomic_notifier_chain_unregister(&panic_notifier_list,
&pvpanic_panic_nb);
return 0;
}
module_acpi_driver(pvpanic_driver);