Exploit databaseDownload repository ZIP
GH-9a497cc26994d431b276e9e3b7a8f75c
satheesh575555/linux-4.19.72_cve-2023-0386
Sources for CVE-2023-0386
20 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files48
satheesh575555/linux-4.19.72_cve-2023-0386Revision ef9a4a9fbf2b
- ↑..Parent directory
- Kconfig
- Makefile
- adis16201.c
- adis16209.c
- adxl345.h
- adxl345_core.c
- adxl345_i2c.c
- adxl345_spi.c
- bma180.c
- bma220_spi.c
- bmc150-accel-core.c
- bmc150-accel-i2c.c
- bmc150-accel-spi.c
- bmc150-accel.h
- cros_ec_accel_legacy.c
- da280.c
- da311.c
- dmard06.c
- dmard09.c
- dmard10.c
- hid-sensor-accel-3d.c
- kxcjk-1013.c
- kxsd9-i2c.c
- kxsd9-spi.c
- kxsd9.c
- kxsd9.h
- mc3230.c
- mma7455.h
- mma7455_core.c
- mma7455_i2c.c
- mma7455_spi.c
- mma7660.c
- mma8452.c
- mma9551.c
- mma9551_core.c
- mma9551_core.h
- mma9553.c
- mxc4005.c
- mxc6255.c
- sca3000.c
- ssp_accel_sensor.c
- st_accel.h
- st_accel_buffer.c
- st_accel_core.c
- st_accel_i2c.c
- st_accel_spi.c
- stk8312.c
- stk8ba50.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
drivers/iio/accel/kxsd9-i2c.c
C · 1,502 bytes// SPDX-License-Identifier: GPL-2.0
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/regmap.h>
#include "kxsd9.h"
static int kxsd9_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
static const struct regmap_config config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = 0x0e,
};
struct regmap *regmap;
regmap = devm_regmap_init_i2c(i2c, &config);
if (IS_ERR(regmap)) {
dev_err(&i2c->dev, "Failed to register i2c regmap %d\n",
(int)PTR_ERR(regmap));
return PTR_ERR(regmap);
}
return kxsd9_common_probe(&i2c->dev,
regmap,
i2c->name);
}
static int kxsd9_i2c_remove(struct i2c_client *client)
{
return kxsd9_common_remove(&client->dev);
}
#ifdef CONFIG_OF
static const struct of_device_id kxsd9_of_match[] = {
{ .compatible = "kionix,kxsd9", },
{ },
};
MODULE_DEVICE_TABLE(of, kxsd9_of_match);
#else
#define kxsd9_of_match NULL
#endif
static const struct i2c_device_id kxsd9_i2c_id[] = {
{"kxsd9", 0},
{ },
};
MODULE_DEVICE_TABLE(i2c, kxsd9_i2c_id);
static struct i2c_driver kxsd9_i2c_driver = {
.driver = {
.name = "kxsd9",
.of_match_table = of_match_ptr(kxsd9_of_match),
.pm = &kxsd9_dev_pm_ops,
},
.probe = kxsd9_i2c_probe,
.remove = kxsd9_i2c_remove,
.id_table = kxsd9_i2c_id,
};
module_i2c_driver(kxsd9_i2c_driver);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("KXSD9 accelerometer I2C interface");