No description
Find a file
Ritesh Harjani 08aeb46279 ANDROID: fuse: Add null terminator to path in canonical path to avoid issue
page allocated in fuse_dentry_canonical_path to be handled in
fuse_dev_do_write is allocated using __get_free_pages(GFP_KERNEL).
This may not return a page with data filled with 0. Now this
page may not have a null terminator at all.
If this happens and userspace fuse daemon screws up by passing a string
to kernel which is not NULL terminated (or did not fill anything),
then inside fuse driver in kernel when we try to do
strlen(fuse_dev_write->kern_path->getname_kernel)
on that page data -> it may give us issue with kernel paging request.

Unable to handle kernel paging request at virtual address
------------[ cut here ]------------
<..>
PC is at strlen+0x10/0x90
LR is at getname_kernel+0x2c/0xf4
<..>
strlen+0x10/0x90
kern_path+0x28/0x4c
fuse_dev_do_write+0x5b8/0x694
fuse_dev_write+0x74/0x94
do_iter_readv_writev+0x80/0xb8
do_readv_writev+0xec/0x1cc
vfs_writev+0x54/0x64
SyS_writev+0x64/0xe4
el0_svc_naked+0x24/0x28

To avoid this we should ensure in case of FUSE_CANONICAL_PATH,
the page is null terminated.

Change-Id: I33ca7cc76b4472eaa982c67bb20685df451121f5
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Bug: 75984715
[Daniel - small edit, using args size ]
Signed-off-by: Daniel Rosenberg <drosen@google.com>
2018-08-28 17:10:42 +05:30
arch ANDROID: arm64: Image.gz-dtb build target depends on Image.gz 2018-08-28 17:10:42 +05:30
block blk-wbt: don't maintain inflight counts if disabled 2018-08-23 09:34:46 -06:00
certs export.h: remove VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR() 2018-08-22 23:21:44 +09:00
crypto DMAengine updates for v4.19-rc1 2018-08-18 15:55:59 -07:00
Documentation ANDROID: memory_state_time: Implement memory_state_time, used by qcom,cpubw 2018-08-28 17:10:42 +05:30
drivers ANDROID: uid_sys_stats: Copy task_struct comm field to bigger buffer 2018-08-28 17:10:42 +05:30
firmware kbuild: remove all dummy assignments to obj- 2017-11-18 11:46:06 +09:00
fs ANDROID: fuse: Add null terminator to path in canonical path to avoid issue 2018-08-28 17:10:42 +05:30
include ANDROID: fsnotify: Notify lower fs of open 2018-08-28 17:10:42 +05:30
init ANDROID: initramfs: call free_initrd() when skipping init 2018-08-28 17:10:42 +05:30
ipc RFC: ANDROID: vfs: Add permission2 for filesystems with per mount permissions 2018-08-28 17:10:42 +05:30
kernel ANDROID: Fix script to fetch android kernel config fragments for 4.14 2018-08-28 17:10:42 +05:30
lib Merge branch 'ida-4.19' of git://git.infradead.org/users/willy/linux-dax 2018-08-26 11:48:42 -07:00
LICENSES LICENSES: Add Linux-OpenIB license text 2018-04-27 16:41:53 -06:00
mm ANDROID: mm: Export do_munmap 2018-08-28 17:10:42 +05:30
net ANDROID: NFC: Fix possible memory corruption when handling SHDLC I-Frame commands 2018-08-28 17:10:42 +05:30
samples samples/bpf: all XDP samples should unload xdp/bpf prog on SIGTERM 2018-08-16 21:55:32 +02:00
scripts ANDROID: kbuild: Makefile.clean: make Kbuild and Makefile optional 2018-08-28 17:10:42 +05:30
security ANDROID: export security_path_chown 2018-08-28 17:10:42 +05:30
sound Merge branch 'akpm' (patches from Andrew) 2018-08-23 19:20:12 -07:00
tools Merge branch 'ida-4.19' of git://git.infradead.org/users/willy/linux-dax 2018-08-26 11:48:42 -07:00
usr initramfs: move gen_initramfs_list.sh from scripts/ to usr/ 2018-08-22 23:21:44 +09:00
virt ARM: Support for Group0 interrupts in guests, Cache management 2018-08-22 13:52:44 -07:00
.clang-format clang-format: Set IndentWrappedFunctionNames false 2018-08-01 18:38:51 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files 2016-10-07 18:46:30 -07:00
.gitignore ANDROID: add script to fetch android kernel config fragments 2018-08-28 16:44:09 +05:30
.mailmap libnvdimm-for-4.19_misc 2018-08-25 18:13:10 -07:00
build.config.goldfish.arm ANDROID: build: add build server configs for goldfish 2018-08-28 17:10:42 +05:30
build.config.goldfish.arm64 ANDROID: build: add build server configs for goldfish 2018-08-28 17:10:42 +05:30
build.config.goldfish.mips ANDROID: build: add build server configs for goldfish 2018-08-28 17:10:42 +05:30
build.config.goldfish.mips64 ANDROID: build: add build server configs for goldfish 2018-08-28 17:10:42 +05:30
build.config.goldfish.x86 ANDROID: build: add build server configs for goldfish 2018-08-28 17:10:42 +05:30
build.config.goldfish.x86_64 ANDROID: build: add build server configs for goldfish 2018-08-28 17:10:42 +05:30
COPYING COPYING: use the new text with points to the license files 2018-03-23 12:41:45 -06:00
CREDITS 9p: remove Ron Minnich from MAINTAINERS 2018-08-17 16:20:26 -07:00
Kbuild Kbuild updates for v4.15 2017-11-17 17:45:29 -08:00
Kconfig kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt 2018-08-02 08:06:55 +09:00
MAINTAINERS libnvdimm-for-4.19_misc 2018-08-25 18:13:10 -07:00
Makefile ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple 2018-08-28 17:10:42 +05:30
README Docs: Added a pointer to the formatted docs to README 2018-03-21 09:02:53 -06:00

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.
See Documentation/00-INDEX for a list of what is contained in each file.

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.