Exploit databaseDownload repository ZIP
GH-a4473dcd9930d1ae4c0775adc06b1cfb
satheesh575555/linux-4.19.72_cve-2022-36946
Sources for CVE-2022-36946
2 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files82
satheesh575555/linux-4.19.72_cve-2022-36946Revision 34cc7d8183fd
- ↑..Parent directory
- 88pm80x_onkey.c
- 88pm860x_onkey.c
- Kconfig
- Makefile
- ab8500-ponkey.c
- ad714x-i2c.c
- ad714x-spi.c
- ad714x.c
- ad714x.h
- adxl34x-i2c.c
- adxl34x-spi.c
- adxl34x.c
- adxl34x.h
- apanel.c
- arizona-haptics.c
- ati_remote2.c
- atlas_btns.c
- atmel_captouch.c
- axp20x-pek.c
- bma150.c
- cm109.c
- cma3000_d0x.c
- cma3000_d0x.h
- cma3000_d0x_i2c.c
- cobalt_btns.c
- cpcap-pwrbutton.c
- da9052_onkey.c
- da9055_onkey.c
- da9063_onkey.c
- dm355evm_keys.c
- drv260x.c
- drv2665.c
- drv2667.c
- e3x0-button.c
- gp2ap002a00f.c
- gpio-beeper.c
- gpio_decoder.c
- hisi_powerkey.c
- hp_sdc_rtc.c
- ideapad_slidebar.c
- ims-pcu.c
- ixp4xx-beeper.c
- keyspan_remote.c
- kxtj9.c
- m68kspkr.c
- max77693-haptic.c
- max8925_onkey.c
- max8997_haptic.c
- mc13783-pwrbutton.c
- mma8450.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
drivers/input/misc/rave-sp-pwrbutton.c
C · 2,284 bytes// SPDX-License-Identifier: GPL-2.0+
//
// Power Button driver for RAVE SP
//
// Copyright (C) 2017 Zodiac Inflight Innovations
//
//
#include <linux/input.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mfd/rave-sp.h>
#include <linux/platform_device.h>
#define RAVE_SP_EVNT_BUTTON_PRESS (RAVE_SP_EVNT_BASE + 0x00)
struct rave_sp_power_button {
struct input_dev *idev;
struct notifier_block nb;
};
static int rave_sp_power_button_event(struct notifier_block *nb,
unsigned long action, void *data)
{
struct rave_sp_power_button *pb =
container_of(nb, struct rave_sp_power_button, nb);
const u8 event = rave_sp_action_unpack_event(action);
const u8 value = rave_sp_action_unpack_value(action);
struct input_dev *idev = pb->idev;
if (event == RAVE_SP_EVNT_BUTTON_PRESS) {
input_report_key(idev, KEY_POWER, value);
input_sync(idev);
return NOTIFY_STOP;
}
return NOTIFY_DONE;
}
static int rave_sp_pwrbutton_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct rave_sp_power_button *pb;
struct input_dev *idev;
int error;
pb = devm_kzalloc(dev, sizeof(*pb), GFP_KERNEL);
if (!pb)
return -ENOMEM;
idev = devm_input_allocate_device(dev);
if (!idev)
return -ENOMEM;
idev->name = pdev->name;
input_set_capability(idev, EV_KEY, KEY_POWER);
error = input_register_device(idev);
if (error)
return error;
pb->idev = idev;
pb->nb.notifier_call = rave_sp_power_button_event;
pb->nb.priority = 128;
error = devm_rave_sp_register_event_notifier(dev, &pb->nb);
if (error)
return error;
return 0;
}
static const struct of_device_id rave_sp_pwrbutton_of_match[] = {
{ .compatible = "zii,rave-sp-pwrbutton" },
{}
};
static struct platform_driver rave_sp_pwrbutton_driver = {
.probe = rave_sp_pwrbutton_probe,
.driver = {
.name = KBUILD_MODNAME,
.of_match_table = rave_sp_pwrbutton_of_match,
},
};
module_platform_driver(rave_sp_pwrbutton_driver);
MODULE_DEVICE_TABLE(of, rave_sp_pwrbutton_of_match);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Andrey Vostrikov <[email protected]>");
MODULE_AUTHOR("Nikita Yushchenko <[email protected]>");
MODULE_AUTHOR("Andrey Smirnov <[email protected]>");
MODULE_DESCRIPTION("RAVE SP Power Button driver");