Exploit databaseDownload repository ZIP
GH-9a497cc26994d431b276e9e3b7a8f75c
satheesh575555/linux-4.19.72_cve-2023-0386
Sources for CVE-2023-0386
19 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files110
satheesh575555/linux-4.19.72_cve-2023-0386Revision ef9a4a9fbf2b
- ↑..Parent directory
- .gitignore
- 8250-platform.c
- Makefile
- asm-offsets.c
- binfmt_elfn32.c
- binfmt_elfo32.c
- bmips_5xxx_init.S
- bmips_vec.S
- branch.c
- cacheinfo.c
- cevt-bcm1480.c
- cevt-ds1287.c
- cevt-gt641xx.c
- cevt-r4k.c
- cevt-sb1250.c
- cevt-txx9.c
- cmpxchg.c
- cps-vec-ns16550.S
- cps-vec.S
- cpu-bugs64.c
- cpu-probe.c
- crash.c
- crash_dump.c
- csrc-bcm1480.c
- csrc-ioasic.c
- csrc-r4k.c
- csrc-sb1250.c
- early_printk.c
- early_printk_8250.c
- elf.c
- entry.S
- ftrace.c
- genex.S
- gpio_txx9.c
- head.S
- i8253.c
- idle.c
- irq-gt641xx.c
- irq-msc01.c
- irq-rm7000.c
- irq.c
- irq_txx9.c
- jump_label.c
- kgdb.c
- kprobes.c
- linux32.c
- machine_kexec.c
- mcount.S
- mips-cm.c
- mips-cpc.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
arch/mips/kernel/signal32.c
C · 2,110 bytes/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 1991, 1992 Linus Torvalds
* Copyright (C) 1994 - 2000, 2006 Ralf Baechle
* Copyright (C) 1999, 2000 Silicon Graphics, Inc.
* Copyright (C) 2016, Imagination Technologies Ltd.
*/
#include <linux/compat.h>
#include <linux/compiler.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/signal.h>
#include <linux/syscalls.h>
#include <asm/compat-signal.h>
#include <linux/uaccess.h>
#include <asm/unistd.h>
#include "signal-common.h"
/* 32-bit compatibility types */
typedef unsigned int __sighandler32_t;
typedef void (*vfptr_t)(void);
/*
* Atomically swap in the new signal mask, and wait for a signal.
*/
asmlinkage int sys32_sigsuspend(compat_sigset_t __user *uset)
{
return compat_sys_rt_sigsuspend(uset, sizeof(compat_sigset_t));
}
SYSCALL_DEFINE3(32_sigaction, long, sig, const struct compat_sigaction __user *, act,
struct compat_sigaction __user *, oact)
{
struct k_sigaction new_ka, old_ka;
int ret;
int err = 0;
if (act) {
old_sigset_t mask;
s32 handler;
if (!access_ok(VERIFY_READ, act, sizeof(*act)))
return -EFAULT;
err |= __get_user(handler, &act->sa_handler);
new_ka.sa.sa_handler = (void __user *)(s64)handler;
err |= __get_user(new_ka.sa.sa_flags, &act->sa_flags);
err |= __get_user(mask, &act->sa_mask.sig[0]);
if (err)
return -EFAULT;
siginitset(&new_ka.sa.sa_mask, mask);
}
ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
if (!ret && oact) {
if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)))
return -EFAULT;
err |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
err |= __put_user((u32)(u64)old_ka.sa.sa_handler,
&oact->sa_handler);
err |= __put_user(old_ka.sa.sa_mask.sig[0], oact->sa_mask.sig);
err |= __put_user(0, &oact->sa_mask.sig[1]);
err |= __put_user(0, &oact->sa_mask.sig[2]);
err |= __put_user(0, &oact->sa_mask.sig[3]);
if (err)
return -EFAULT;
}
return ret;
}