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 files100
satheesh575555/linux-4.19.72_cve-2023-0386Revision ef9a4a9fbf2b
- ↑..Parent directory
- 8250/
- cpm_uart/
- jsm/
- 21285.c
- Kconfig
- Makefile
- altera_jtaguart.c
- altera_uart.c
- amba-pl010.c
- amba-pl011.c
- amba-pl011.h
- apbuart.c
- apbuart.h
- ar933x_uart.c
- arc_uart.c
- atmel_serial.c
- atmel_serial.h
- bcm63xx_uart.c
- clps711x.c
- digicolor-usart.c
- dz.c
- dz.h
- earlycon-arm-semihost.c
- earlycon.c
- efm32-uart.c
- fsl_lpuart.c
- icom.c
- icom.h
- ifx6x60.c
- ifx6x60.h
- imx.c
- ioc3_serial.c
- ioc4_serial.c
- ip22zilog.c
- ip22zilog.h
- kgdb_nmi.c
- kgdboc.c
- lantiq.c
- lpc32xx_hs.c
- max3100.c
- max310x.c
- mcf.c
- men_z135_uart.c
- meson_uart.c
- mpc52xx_uart.c
- mps2-uart.c
- mpsc.c
- msm_serial.c
- mux.c
- mvebu-uart.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
drivers/tty/serial/earlycon-arm-semihost.c
C · 1,164 bytes// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2012 ARM Ltd.
* Author: Marc Zyngier <[email protected]>
*
* Adapted for ARM and earlycon:
* Copyright (C) 2014 Linaro Ltd.
* Author: Rob Herring <[email protected]>
*/
#include <linux/kernel.h>
#include <linux/console.h>
#include <linux/init.h>
#include <linux/serial_core.h>
#ifdef CONFIG_THUMB2_KERNEL
#define SEMIHOST_SWI "0xab"
#else
#define SEMIHOST_SWI "0x123456"
#endif
/*
* Semihosting-based debug console
*/
static void smh_putc(struct uart_port *port, int c)
{
#ifdef CONFIG_ARM64
asm volatile("mov x1, %0\n"
"mov x0, #3\n"
"hlt 0xf000\n"
: : "r" (&c) : "x0", "x1", "memory");
#else
asm volatile("mov r1, %0\n"
"mov r0, #3\n"
"svc " SEMIHOST_SWI "\n"
: : "r" (&c) : "r0", "r1", "memory");
#endif
}
static void smh_write(struct console *con, const char *s, unsigned n)
{
struct earlycon_device *dev = con->data;
uart_console_write(&dev->port, s, n, smh_putc);
}
static int
__init early_smh_setup(struct earlycon_device *device, const char *opt)
{
device->con->write = smh_write;
return 0;
}
EARLYCON_DECLARE(smh, early_smh_setup);