No description
Find a file
Filipe Manana 78a2890fcd Btrfs: ensure path name is null terminated at btrfs_control_ioctl
commit f505754fd6 upstream.

We were using the path name received from user space without checking that
it is null terminated. While btrfs-progs is well behaved and does proper
validation and null termination, someone could call the ioctl and pass
a non-null terminated patch, leading to buffer overrun problems in the
kernel.  The ioctl is protected by CAP_SYS_ADMIN.

So just set the last byte of the path to a null character, similar to what
we do in other ioctls (add/remove/resize device, snapshot creation, etc).

CC: stable@vger.kernel.org # 4.4+
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-05 19:32:06 +01:00
arch xtensa: fix coprocessor part of ptrace_{get,set}xregs 2018-12-05 19:32:06 +01:00
block block: copy ioprio in __bio_clone_fast() and bounce 2018-12-01 09:37:32 +01:00
certs
crypto crypto: simd - correctly take reqsize of wrapped skcipher into account 2018-12-01 09:37:32 +01:00
Documentation x86/speculation: Provide IBPB always command line options 2018-12-05 19:32:04 +01:00
drivers net: phy: add workaround for issue where PHY driver doesn't bind to the device 2018-12-05 19:32:00 +01:00
firmware
fs Btrfs: ensure path name is null terminated at btrfs_control_ioctl 2018-12-05 19:32:06 +01:00
include x86/speculation: Add prctl() control for indirect branch speculation 2018-12-05 19:32:04 +01:00
init
ipc
kernel ptrace: Remove unused ptrace_may_access_sched() and MODE_IBRS 2018-12-05 19:32:03 +01:00
lib
LICENSES
mm userfaultfd: shmem/hugetlbfs: only allow to register VM_MAYWRITE vmas 2018-12-05 19:32:04 +01:00
net tipc: fix lockdep warning during node delete 2018-12-05 19:32:00 +01:00
samples
scripts x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support 2018-12-05 19:32:01 +01:00
security selinux: Add __GFP_NOWARN to allocation at str_read() 2018-12-01 09:37:27 +01:00
sound
tools x86/speculation: Add prctl() control for indirect branch speculation 2018-12-05 19:32:04 +01:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile Linux 4.19.6 2018-12-01 09:37:35 +01: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.
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.