No description
Find a file
Christian Brauner 45e4d11fa6 binderfs: use refcount for binder control devices too
Binderfs binder-control devices are cleaned up via binderfs_evict_inode
too() which will use refcount_dec_and_test(). However, we missed to set
the refcount for binderfs binder-control devices and so we underflowed
when the binderfs instance got unmounted. Pretty obvious oversight and
should have been part of the more general UAF fix. The good news is that
having test cases (suprisingly) helps.

Technically, we could detect that we're about to cleanup the
binder-control dentry in binderfs_evict_inode() and then simply clean it
up. But that makes the assumption that the binder driver itself will
never make use of a binderfs binder-control device after the binderfs
instance it belongs to has been unmounted and the superblock for it been
destroyed. While it is unlikely to ever come to this let's be on the
safe side. Performance-wise this also really doesn't matter since the
binder-control device is only every really when creating the binderfs
filesystem or creating additional binder devices. Both operations are
pretty rare.

Fixes: f0fe2c0f050d ("binder: prevent UAF for binderfs devices II")
Link: https://lore.kernel.org/r/CA+G9fYusdfg7PMfC9Xce-xLT7NiyKSbgojpK35GOm=Pf9jXXrA@mail.gmail.com
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: stable@vger.kernel.org
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Acked-by: Todd Kjos <tkjos@google.com>
Link: https://lore.kernel.org/r/20200311105309.1742827-1-christian.brauner@ubuntu.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-16 14:59:34 +02:00
android ANDROID: GKI: update the ABI xml 2020-10-30 12:21:53 +08:00
arch (halium) pro1x-perf_defconfig: enable extra binder devices 2022-08-04 17:05:50 +03:00
block Import Pro1-X kernel source code 2022-03-20 00:13:44 +01:00
certs Merge remote-tracking branch 'origin/tmp-441e17f' into msm-kona 2018-09-05 14:58:16 -07:00
crypto Merge android-4.19-stable.157 (8ee67bc) into msm-4.19 2020-12-18 18:35:06 +05:30
Documentation BACKPORT: cgroup: make per-cgroup pressure stall tracking configurable 2021-07-01 23:43:00 -07:00
drivers binderfs: use refcount for binder control devices too 2023-01-16 14:59:34 +02:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:21:29 +01:00
fs Revert "Revert "proc: Convert proc_mount to use mount_ns."" 2022-09-20 15:10:48 +03:00
include kernel: Merge LA.UM.9.15.r1-05300-KAMORTA.0 2022-06-11 03:14:24 +03:00
init Import Pro1-X kernel source code 2022-03-20 00:13:44 +01:00
ipc This is the 4.19.124 stable release 2020-05-20 11:37:46 +02:00
kernel Import Pro1-X kernel source code 2022-03-20 00:13:44 +01:00
lib Import F(x)tec Pro1-X BSP kernel changes as of 2022-06-01 2022-06-13 23:51:22 +03:00
LICENSES LICENSES: Add ISC license text 2019-01-10 17:22:01 +02:00
mm Import Pro1-X kernel source code 2022-03-20 00:13:44 +01:00
net Import Pro1-X kernel source code 2022-03-20 00:13:44 +01:00
samples This is the 4.19.154 stable release 2020-10-30 11:43:26 +01:00
scripts Import Pro1-X kernel source code 2022-03-20 00:13:44 +01:00
security kernel: Merge LA.UM.9.15.r1-05300-KAMORTA.0 2022-06-11 03:14:24 +03:00
sound Import Pro1-X kernel source code 2022-03-20 00:13:44 +01:00
techpack Import F(x)tec Pro1-X BSP kernel changes as of 2022-06-01 2022-06-13 23:51:22 +03:00
tools This is the 4.19.156 stable release 2020-11-10 13:23:09 +01:00
usr initramfs: restore default compression behavior 2020-04-13 10:44:59 +02:00
virt Merge android-4.19-stable.149 (9ce79d9) into msm-4.19 2020-10-21 09:25:49 +05:30
.clang-format clang-format: Set IndentWrappedFunctionNames false 2018-08-01 18:38:51 +02:00
.cocciconfig scripts: add Linux .cocciconfig for coccinelle 2016-07-22 12:13:39 +02:00
.drone.yml drone: Try GH releases. 2021-08-28 07:11:42 +02:00
.get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files 2016-10-07 18:46:30 -07:00
.gitignore kernel: update gitignore. 2021-08-25 13:11:11 +02:00
.mailmap libnvdimm-for-4.19_misc 2018-08-25 18:13:10 -07:00
Android.bp Use environment variable to find unifdef tool 2021-06-25 00:24:52 -07:00
AndroidKernel.mk AndroidKernel: add TARGET_PREBUILT_INT_KERNEL_IMAGE 2019-08-02 20:31:09 +08:00
build.config.aarch64 Revert "ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple" 2020-11-10 11:47:24 -08:00
build.config.allmodconfig Revert "ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple" 2020-11-10 11:47:24 -08:00
build.config.allmodconfig.aarch64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.allmodconfig.arm ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.allmodconfig.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.arm Revert "ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple" 2020-11-10 11:47:24 -08:00
build.config.common ANDROID: clang: update to 11.0.5 2020-10-27 11:18:23 -07:00
build.config.gki ANDROID: gki: Removed cf modules from gki_defconfig 2020-01-31 16:23:38 -08:00
build.config.gki-debug.aarch64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki-debug.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki.aarch64 ANDROID: GKI: prevent removal of monitored symbols 2020-09-29 11:48:43 +01:00
build.config.gki.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki_kasan ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki_kasan.aarch64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki_kasan.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.goldfish.arm ANDROID: build.config: enforce trace_printk check 2018-08-28 17:10:42 +05:30
build.config.goldfish.arm64 ANDROID: build.config: enforce trace_printk check 2018-08-28 17:10:42 +05:30
build.config.goldfish.mips ANDROID: build.config: enforce trace_printk check 2018-08-28 17:10:42 +05:30
build.config.goldfish.mips64 ANDROID: build.config: enforce trace_printk check 2018-08-28 17:10:42 +05:30
build.config.goldfish.x86 ANDROID: build.config: enforce trace_printk check 2018-08-28 17:10:42 +05:30
build.config.goldfish.x86_64 ANDROID: build.config: enforce trace_printk check 2018-08-28 17:10:42 +05:30
build.config.x86_64 Revert "ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple" 2020-11-10 11:47:24 -08:00
build.sh build: compile with Proton Clang. 2021-09-15 09:27:37 +02:00
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
gen_headers_arm.bp Import Pro1-X kernel source code 2022-03-20 00:13:44 +01:00
gen_headers_arm64.bp Import Pro1-X kernel source code 2022-03-20 00:13:44 +01: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
kernel_headers.py Change the subprocess argument to fix the build issue 2021-06-28 16:47:30 +05:30
MAINTAINERS UPSTREAM: HID: playstation: Initial DualSense USB support 2021-08-06 12:46:40 +05:30
Makefile Import Pro1-X kernel source code 2022-03-20 00:13:44 +01:00
README Docs: Added a pointer to the formatted docs to README 2018-03-21 09:02:53 -06:00
verity_dev_keys.x509 x86_64_cuttlefish_defconfig: enable verity cert 2018-08-28 17:15:17 +05:30

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.