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 files36
satheesh575555/linux-4.19.72_cve-2023-0386Revision ef9a4a9fbf2b
- ↑..Parent directory
- 8250.h
- 8250_accent.c
- 8250_acorn.c
- 8250_aspeed_vuart.c
- 8250_bcm2835aux.c
- 8250_boca.c
- 8250_core.c
- 8250_dma.c
- 8250_dw.c
- 8250_early.c
- 8250_em.c
- 8250_exar.c
- 8250_exar_st16c554.c
- 8250_fintek.c
- 8250_fourport.c
- 8250_fsl.c
- 8250_gsc.c
- 8250_hp300.c
- 8250_hub6.c
- 8250_ingenic.c
- 8250_lpc18xx.c
- 8250_lpss.c
- 8250_men_mcb.c
- 8250_mid.c
- 8250_moxa.c
- 8250_mtk.c
- 8250_of.c
- 8250_omap.c
- 8250_pci.c
- 8250_pnp.c
- 8250_port.c
- 8250_pxa.c
- 8250_uniphier.c
- Kconfig
- Makefile
- serial_cs.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
drivers/tty/serial/8250/8250_fsl.c
C · 1,658 bytes// SPDX-License-Identifier: GPL-2.0
#include <linux/serial_reg.h>
#include <linux/serial_8250.h>
#include "8250.h"
/*
* Freescale 16550 UART "driver", Copyright (C) 2011 Paul Gortmaker.
*
* This isn't a full driver; it just provides an alternate IRQ
* handler to deal with an errata. Everything else is just
* using the bog standard 8250 support.
*
* We follow code flow of serial8250_default_handle_irq() but add
* a check for a break and insert a dummy read on the Rx for the
* immediately following IRQ event.
*
* We re-use the already existing "bug handling" lsr_saved_flags
* field to carry the "what we just did" information from the one
* IRQ event to the next one.
*/
int fsl8250_handle_irq(struct uart_port *port)
{
unsigned char lsr, orig_lsr;
unsigned long flags;
unsigned int iir;
struct uart_8250_port *up = up_to_u8250p(port);
spin_lock_irqsave(&up->port.lock, flags);
iir = port->serial_in(port, UART_IIR);
if (iir & UART_IIR_NO_INT) {
spin_unlock_irqrestore(&up->port.lock, flags);
return 0;
}
/* This is the WAR; if last event was BRK, then read and return */
if (unlikely(up->lsr_saved_flags & UART_LSR_BI)) {
up->lsr_saved_flags &= ~UART_LSR_BI;
port->serial_in(port, UART_RX);
spin_unlock_irqrestore(&up->port.lock, flags);
return 1;
}
lsr = orig_lsr = up->port.serial_in(&up->port, UART_LSR);
if (lsr & (UART_LSR_DR | UART_LSR_BI))
lsr = serial8250_rx_chars(up, lsr);
serial8250_modem_status(up);
if (lsr & UART_LSR_THRE)
serial8250_tx_chars(up);
up->lsr_saved_flags = orig_lsr;
spin_unlock_irqrestore(&up->port.lock, flags);
return 1;
}
EXPORT_SYMBOL_GPL(fsl8250_handle_irq);