Kernel Tree For Xiaomi 11 Lite NE 5G
Go to file
Tadeusz Struk 21446ad9cb usb: mon: make mmapped memory read only
commit a659daf63d16aa883be42f3f34ff84235c302198 upstream.

Syzbot found an issue in usbmon module, where the user space client can
corrupt the monitor's internal memory, causing the usbmon module to
crash the kernel with segfault, UAF, etc.

The reproducer mmaps the /dev/usbmon memory to user space, and
overwrites it with arbitrary data, which causes all kinds of issues.

Return an -EPERM error from mon_bin_mmap() if the flag VM_WRTIE is set.
Also clear VM_MAYWRITE to make it impossible to change it to writable
later.

Cc: "Dmitry Vyukov" <dvyukov@google.com>
Cc: stable <stable@kernel.org>
Fixes: 6f23ee1fef ("USB: add binary API to usbmon")
Suggested-by: PaX Team <pageexec@freemail.hu>	# for the VM_MAYRITE portion
Link: https://syzkaller.appspot.com/bug?id=2eb1f35d6525fa4a74d75b4244971e5b1411c95a
Reported-by: syzbot+23f57c5ae902429285d7@syzkaller.appspotmail.com
Signed-off-by: Tadeusz Struk <tadeusz.struk@linaro.org>
Link: https://lore.kernel.org/r/20220919215957.205681-1-tadeusz.struk@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-15 07:54:38 +02:00
arch arch: um: Mark the stack non-executable to fix a binutils warning 2022-10-15 07:54:38 +02:00
block blk-mq: don't create hctx debugfs dir until q->debugfs_dir is created 2022-08-25 11:17:36 +02:00
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist 2022-06-22 14:11:22 +02:00
crypto crypto: drbg - make reseeding from get_random_bytes() synchronous 2022-06-22 14:11:18 +02:00
Documentation ARM: dts: fix Moxa SDIO 'compatible', remove 'sdhci' misnomer 2022-10-15 07:54:37 +02:00
drivers usb: mon: make mmapped memory read only 2022-10-15 07:54:38 +02:00
fs fs: fix UAF/GPF bug in nilfs_mdt_destroy 2022-10-15 07:54:36 +02:00
include net/ieee802154: fix uninit value bug in dgram_sendmsg 2022-10-15 07:54:37 +02:00
init random: handle latent entropy and command line from random_init() 2022-06-22 14:11:17 +02:00
ipc ipc/mqueue: use get_tree_nodev() in mqueue_get_tree() 2022-06-14 18:11:41 +02:00
kernel workqueue: don't skip lockdep work dependency in cancel_work_sync() 2022-09-28 11:04:09 +02:00
lib lib/vdso: Mark do_hres() and do_coarse() as __always_inline 2022-09-05 10:27:47 +02:00
LICENSES
mm mm: pagewalk: Fix race between unmap and page walker 2022-10-15 07:54:36 +02:00
net net/ieee802154: fix uninit value bug in dgram_sendmsg 2022-10-15 07:54:37 +02:00
samples
scripts Makefile.extrawarn: Move -Wcast-function-type-strict to W=1 2022-10-07 09:16:57 +02:00
security apparmor: Fix memleak in aa_simple_write_to_buffer() 2022-08-25 11:18:21 +02:00
sound ALSA: hda/realtek: Enable 4-speaker output Dell Precision 5530 laptop 2022-09-28 11:04:04 +02:00
tools perf tools: Fixup get_current_dir_name() compilation 2022-10-15 07:54:36 +02:00
usr
virt KVM: Add infrastructure and macro to mark VM as bugged 2022-08-25 11:18:16 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: add Chandan as xfs maintainer for 5.4.y 2022-09-28 11:03:58 +02:00
Makefile Linux 5.4.217 2022-10-07 09:16:57 +02: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 Restructured Text 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.