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 files38
satheesh575555/linux-4.19.72_cve-2022-36946Revision 34cc7d8183fd
- ↑..Parent directory
- Kconfig
- Makefile
- amd-rng.c
- atmel-rng.c
- bcm2835-rng.c
- cavium-rng-vf.c
- cavium-rng.c
- core.c
- exynos-trng.c
- geode-rng.c
- hisi-rng.c
- imx-rngc.c
- intel-rng.c
- iproc-rng200.c
- ixp4xx-rng.c
- ks-sa-rng.c
- meson-rng.c
- mtk-rng.c
- mxc-rnga.c
- n2-asm.S
- n2-drv.c
- n2rng.h
- nomadik-rng.c
- octeon-rng.c
- omap-rng.c
- omap3-rom-rng.c
- pasemi-rng.c
- pic32-rng.c
- powernv-rng.c
- pseries-rng.c
- s390-trng.c
- st-rng.c
- stm32-rng.c
- timeriomem-rng.c
- tx4939-rng.c
- via-rng.c
- virtio-rng.c
- xgene-rng.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
drivers/char/hw_random/ixp4xx-rng.c
C · 1,664 bytes/*
* drivers/char/hw_random/ixp4xx-rng.c
*
* RNG driver for Intel IXP4xx family of NPUs
*
* Author: Deepak Saxena <[email protected]>
*
* Copyright 2005 (c) MontaVista Software, Inc.
*
* Fixes by Michael Buesch
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/bitops.h>
#include <linux/hw_random.h>
#include <asm/io.h>
#include <mach/hardware.h>
static int ixp4xx_rng_data_read(struct hwrng *rng, u32 *buffer)
{
void __iomem * rng_base = (void __iomem *)rng->priv;
*buffer = __raw_readl(rng_base);
return 4;
}
static struct hwrng ixp4xx_rng_ops = {
.name = "ixp4xx",
.data_read = ixp4xx_rng_data_read,
};
static int __init ixp4xx_rng_init(void)
{
void __iomem * rng_base;
int err;
if (!cpu_is_ixp46x()) /* includes IXP455 */
return -ENOSYS;
rng_base = ioremap(0x70002100, 4);
if (!rng_base)
return -ENOMEM;
ixp4xx_rng_ops.priv = (unsigned long)rng_base;
err = hwrng_register(&ixp4xx_rng_ops);
if (err)
iounmap(rng_base);
return err;
}
static void __exit ixp4xx_rng_exit(void)
{
void __iomem * rng_base = (void __iomem *)ixp4xx_rng_ops.priv;
hwrng_unregister(&ixp4xx_rng_ops);
iounmap(rng_base);
}
module_init(ixp4xx_rng_init);
module_exit(ixp4xx_rng_exit);
MODULE_AUTHOR("Deepak Saxena <[email protected]>");
MODULE_DESCRIPTION("H/W Pseudo-Random Number Generator (RNG) driver for IXP45x/46x");
MODULE_LICENSE("GPL");