Linux kernel source tree
Find a file
Jann Horn 14611508cb mm: mark mas allocation in vms_abort_munmap_vmas as __GFP_NOFAIL
vms_abort_munmap_vmas() is a recovery path where, on entry, some VMAs have
already been torn down halfway (in a way we can't undo) but are still
present in the maple tree.

At this point, we *must* remove the VMAs from the VMA tree, otherwise we
get UAF.

Because removing VMA tree nodes can require memory allocation, the
existing code has an error path which tries to handle this by reattaching
the VMAs; but that can't be done safely.

A nicer way to fix it would probably be to preallocate enough maple tree
nodes for the removal before the point of no return, or something like
that; but for now, fix it the easy and kinda ugly way, by marking this
allocation __GFP_NOFAIL.

Link: https://lkml.kernel.org/r/20241016-fix-munmap-abort-v1-1-601c94b2240d@google.com
Fixes: 4f87153e82 ("mm: change failure of MAP_FIXED to restoring the gap on failure")
Signed-off-by: Jann Horn <jannh@google.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-10-28 21:40:39 -07:00
arch x86/traps: move kmsan check after instrumentation_begin 2024-10-28 21:40:39 -07:00
block block-6.12-20241026 2024-10-27 08:29:36 -10:00
certs sign-file,extract-cert: use pkcs11 provider for OPENSSL MAJOR >= 3 2024-09-20 19:52:48 +03:00
crypto This push fixes the following issues: 2024-10-16 08:42:54 -07:00
Documentation Power management fixes for 6.12-rc5 2024-10-25 11:00:50 -07:00
drivers platform-drivers-x86 for v6.12-3 2024-10-27 08:40:33 -10:00
fs fork: do not invoke uffd on fork if error occurs 2024-10-28 21:40:38 -07:00
include fork: only invoke khugepaged, ksm hooks if no error 2024-10-28 21:40:39 -07:00
init cfi: fix conditions for HAVE_CFI_ICALL_NORMALIZE_INTEGERS 2024-10-13 22:23:13 +02:00
io_uring io_uring/rw: fix wrong NOWAIT check in io_rw_init_file() 2024-10-19 09:25:45 -06:00
ipc struct fd layout change (and conversion to accessor helpers) 2024-09-23 09:35:36 -07:00
kernel fork: only invoke khugepaged, ksm hooks if no error 2024-10-28 21:40:39 -07:00
lib Probes fixes for v6.12-rc4(2): 2024-10-24 13:51:58 -07:00
LICENSES LICENSES: add 0BSD license text 2024-09-01 20:43:24 -07:00
mm mm: mark mas allocation in vms_abort_munmap_vmas as __GFP_NOFAIL 2024-10-28 21:40:39 -07:00
net BPF fixes: 2024-10-24 16:53:20 -07:00
rust Driver core fix for 6.12-rc3 2024-10-13 09:10:52 -07:00
samples [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
scripts kbuild: rust: add CONFIG_RUSTC_LLVM_VERSION 2024-10-13 22:22:28 +02:00
security ipe: fallback to platform keyring also if key in trusted keyring is rejected 2024-10-18 12:14:53 -07:00
sound ASoC: Fixes for v6.12 2024-10-24 07:57:39 +02:00
tools BPF fixes: 2024-10-24 16:53:20 -07:00
usr initramfs: shorten cmd_initfs in usr/Makefile 2024-07-16 01:07:52 +09:00
virt ARM64: 2024-10-21 11:22:04 -07:00
.clang-format clang-format: Update with v6.11-rc1's for_each macro list 2024-08-02 13:20:31 +02:00
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore Kbuild updates for v6.12 2024-09-24 13:02:06 -07:00
.mailmap Including fixes from netfiler, xfrm and bluetooth. 2024-10-24 16:43:50 -07:00
.rustfmt.toml
COPYING
CREDITS CREDITS: sort alphabetically by name 2024-10-09 12:47:19 -07:00
Kbuild
Kconfig
MAINTAINERS gpio fixes for v6.12-rc5 2024-10-25 10:47:51 -07:00
Makefile Linux 6.12-rc5 2024-10-27 12:52:02 -10:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.