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 files112
satheesh575555/linux-4.19.72_cve-2023-0386Revision ef9a4a9fbf2b
- ↑..Parent directory
- kasan/
- Kconfig
- Kconfig.debug
- Makefile
- backing-dev.c
- balloon_compaction.c
- bootmem.c
- cleancache.c
- cma.c
- cma.h
- cma_debug.c
- compaction.c
- debug.c
- debug_page_ref.c
- dmapool.c
- early_ioremap.c
- fadvise.c
- failslab.c
- filemap.c
- frame_vector.c
- frontswap.c
- gup.c
- gup_benchmark.c
- highmem.c
- hmm.c
- huge_memory.c
- hugetlb.c
- hugetlb_cgroup.c
- hwpoison-inject.c
- init-mm.c
- internal.h
- interval_tree.c
- khugepaged.c
- kmemleak-test.c
- kmemleak.c
- ksm.c
- list_lru.c
- maccess.c
- madvise.c
- memblock.c
- memcontrol.c
- memfd.c
- memory-failure.c
- memory.c
- memory_hotplug.c
- mempolicy.c
- mempool.c
- memtest.c
- migrate.c
- mincore.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
mm/init-mm.c
C · 1,274 bytes// SPDX-License-Identifier: GPL-2.0
#include <linux/mm_types.h>
#include <linux/rbtree.h>
#include <linux/rwsem.h>
#include <linux/spinlock.h>
#include <linux/list.h>
#include <linux/cpumask.h>
#include <linux/atomic.h>
#include <linux/user_namespace.h>
#include <asm/pgtable.h>
#include <asm/mmu.h>
#ifndef INIT_MM_CONTEXT
#define INIT_MM_CONTEXT(name)
#endif
/*
* For dynamically allocated mm_structs, there is a dynamically sized cpumask
* at the end of the structure, the size of which depends on the maximum CPU
* number the system can see. That way we allocate only as much memory for
* mm_cpumask() as needed for the hundreds, or thousands of processes that
* a system typically runs.
*
* Since there is only one init_mm in the entire system, keep it simple
* and size this cpu_bitmask to NR_CPUS.
*/
struct mm_struct init_mm = {
.mm_rb = RB_ROOT,
.pgd = swapper_pg_dir,
.mm_users = ATOMIC_INIT(2),
.mm_count = ATOMIC_INIT(1),
.mmap_sem = __RWSEM_INITIALIZER(init_mm.mmap_sem),
.page_table_lock = __SPIN_LOCK_UNLOCKED(init_mm.page_table_lock),
.arg_lock = __SPIN_LOCK_UNLOCKED(init_mm.arg_lock),
.mmlist = LIST_HEAD_INIT(init_mm.mmlist),
.user_ns = &init_user_ns,
.cpu_bitmap = { [BITS_TO_LONGS(NR_CPUS)] = 0},
INIT_MM_CONTEXT(init_mm)
};