No description
45e4d11fa6
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> |
||
---|---|---|
android | ||
arch | ||
block | ||
certs | ||
crypto | ||
Documentation | ||
drivers | ||
firmware | ||
fs | ||
include | ||
init | ||
ipc | ||
kernel | ||
lib | ||
LICENSES | ||
mm | ||
net | ||
samples | ||
scripts | ||
security | ||
sound | ||
techpack | ||
tools | ||
usr | ||
virt | ||
.clang-format | ||
.cocciconfig | ||
.drone.yml | ||
.get_maintainer.ignore | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
Android.bp | ||
AndroidKernel.mk | ||
build.config.aarch64 | ||
build.config.allmodconfig | ||
build.config.allmodconfig.aarch64 | ||
build.config.allmodconfig.arm | ||
build.config.allmodconfig.x86_64 | ||
build.config.arm | ||
build.config.common | ||
build.config.gki | ||
build.config.gki-debug.aarch64 | ||
build.config.gki-debug.x86_64 | ||
build.config.gki.aarch64 | ||
build.config.gki.x86_64 | ||
build.config.gki_kasan | ||
build.config.gki_kasan.aarch64 | ||
build.config.gki_kasan.x86_64 | ||
build.config.goldfish.arm | ||
build.config.goldfish.arm64 | ||
build.config.goldfish.mips | ||
build.config.goldfish.mips64 | ||
build.config.goldfish.x86 | ||
build.config.goldfish.x86_64 | ||
build.config.x86_64 | ||
build.sh | ||
COPYING | ||
CREDITS | ||
gen_headers_arm.bp | ||
gen_headers_arm64.bp | ||
Kbuild | ||
Kconfig | ||
kernel_headers.py | ||
MAINTAINERS | ||
Makefile | ||
README | ||
verity_dev_keys.x509 |
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.