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 files151
satheesh575555/linux-4.19.72_cve-2022-36946Revision 34cc7d8183fd
- ↑..Parent directory
- 8255.c
- 8255.h
- 8255_pci.c
- Makefile
- addi_apci_1032.c
- addi_apci_1500.c
- addi_apci_1516.c
- addi_apci_1564.c
- addi_apci_16xx.c
- addi_apci_2032.c
- addi_apci_2200.c
- addi_apci_3120.c
- addi_apci_3501.c
- addi_apci_3xxx.c
- addi_tcw.h
- addi_watchdog.c
- addi_watchdog.h
- adl_pci6208.c
- adl_pci7x3x.c
- adl_pci8164.c
- adl_pci9111.c
- adl_pci9118.c
- adq12b.c
- adv_pci1710.c
- adv_pci1720.c
- adv_pci1723.c
- adv_pci1724.c
- adv_pci1760.c
- adv_pci_dio.c
- aio_aio12_8.c
- aio_iiro_16.c
- amcc_s5933.h
- amplc_dio200.c
- amplc_dio200.h
- amplc_dio200_common.c
- amplc_dio200_pci.c
- amplc_pc236.c
- amplc_pc236.h
- amplc_pc236_common.c
- amplc_pc263.c
- amplc_pci224.c
- amplc_pci230.c
- amplc_pci236.c
- amplc_pci263.c
- c6xdigio.c
- cb_das16_cs.c
- cb_pcidas.c
- cb_pcidas64.c
- cb_pcidda.c
- cb_pcimdas.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
drivers/staging/comedi/drivers/fl512.c
C · 3,257 bytes// SPDX-License-Identifier: GPL-2.0+
/*
* fl512.c
* Anders Gnistrup <[email protected]>
*
* COMEDI - Linux Control and Measurement Device Interface
* Copyright (C) 2000 David A. Schleef <[email protected]>
*/
/*
* Driver: fl512
* Description: unknown
* Author: Anders Gnistrup <[email protected]>
* Devices: [unknown] FL512 (fl512)
* Status: unknown
*
* Digital I/O is not supported.
*
* Configuration options:
* [0] - I/O port base address
*/
#include <linux/module.h>
#include "../comedidev.h"
#include <linux/delay.h>
/*
* Register I/O map
*/
#define FL512_AI_LSB_REG 0x02
#define FL512_AI_MSB_REG 0x03
#define FL512_AI_MUX_REG 0x02
#define FL512_AI_START_CONV_REG 0x03
#define FL512_AO_DATA_REG(x) (0x04 + ((x) * 2))
#define FL512_AO_TRIG_REG(x) (0x04 + ((x) * 2))
static const struct comedi_lrange range_fl512 = {
4, {
BIP_RANGE(0.5),
BIP_RANGE(1),
BIP_RANGE(5),
BIP_RANGE(10),
UNI_RANGE(1),
UNI_RANGE(5),
UNI_RANGE(10)
}
};
static int fl512_ai_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{
unsigned int chan = CR_CHAN(insn->chanspec);
unsigned int val;
int i;
outb(chan, dev->iobase + FL512_AI_MUX_REG);
for (i = 0; i < insn->n; i++) {
outb(0, dev->iobase + FL512_AI_START_CONV_REG);
/* XXX should test "done" flag instead of delay */
usleep_range(30, 100);
val = inb(dev->iobase + FL512_AI_LSB_REG);
val |= (inb(dev->iobase + FL512_AI_MSB_REG) << 8);
val &= s->maxdata;
data[i] = val;
}
return insn->n;
}
static int fl512_ao_insn_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{
unsigned int chan = CR_CHAN(insn->chanspec);
unsigned int val = s->readback[chan];
int i;
for (i = 0; i < insn->n; i++) {
val = data[i];
/* write LSB, MSB then trigger conversion */
outb(val & 0x0ff, dev->iobase + FL512_AO_DATA_REG(chan));
outb((val >> 8) & 0xf, dev->iobase + FL512_AO_DATA_REG(chan));
inb(dev->iobase + FL512_AO_TRIG_REG(chan));
}
s->readback[chan] = val;
return insn->n;
}
static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{
struct comedi_subdevice *s;
int ret;
ret = comedi_request_region(dev, it->options[0], 0x10);
if (ret)
return ret;
ret = comedi_alloc_subdevices(dev, 2);
if (ret)
return ret;
/* Analog Input subdevice */
s = &dev->subdevices[0];
s->type = COMEDI_SUBD_AI;
s->subdev_flags = SDF_READABLE | SDF_GROUND;
s->n_chan = 16;
s->maxdata = 0x0fff;
s->range_table = &range_fl512;
s->insn_read = fl512_ai_insn_read;
/* Analog Output subdevice */
s = &dev->subdevices[1];
s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITABLE;
s->n_chan = 2;
s->maxdata = 0x0fff;
s->range_table = &range_fl512;
s->insn_write = fl512_ao_insn_write;
return comedi_alloc_subdev_readback(s);
}
static struct comedi_driver fl512_driver = {
.driver_name = "fl512",
.module = THIS_MODULE,
.attach = fl512_attach,
.detach = comedi_legacy_detach,
};
module_comedi_driver(fl512_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver");
MODULE_LICENSE("GPL");