Go to file
Chris Wilson d710fc16ff drm/i915: Prevent overflow of execbuf.buffer_count and num_cliprects
We check whether the multiplies will overflow prior to calling
kmalloc_array so that we can respond with -EINVAL for the invalid user
arguments rather than treating it as an -ENOMEM that would otherwise
occur. However, as Dan Carpenter pointed out, we did an addition on the
unsigned int prior to passing to kmalloc_array where it would be
promoted to size_t for the calculation, thereby allowing it to overflow
and underallocate.

v2: buffer_count is currently limited to INT_MAX because we treat it as
signaled variable for LUT_HANDLE in eb_lookup_vma
v3: Move common checks for eb1/eb2 into the same function
v4: Put the check back for nfence*sizeof(user_fence) overflow
v5: access_ok uses ULONG_MAX but kvmalloc_array uses SIZE_MAX
v6: size_t and unsigned long are not type-equivalent on 32b

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171116105059.25142-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-11-16 14:17:08 +00:00
Documentation Linux 4.14-rc7 2017-11-02 12:40:41 +10:00
arch Merge airlied/drm-next into drm-intel-next-queued 2017-11-14 07:43:00 -08:00
block bio_copy_user_iov(): don't ignore ->iov_offset 2017-10-10 23:55:14 -04:00
certs modsign: add markers to endif-statements in certs/Makefile 2017-07-14 11:01:37 +10:00
crypto Merge commit 'tags/keys-fixes-20171018' into fixes-v4.14-rc5 2017-10-19 12:28:38 +11:00
drivers drm/i915: Prevent overflow of execbuf.buffer_count and num_cliprects 2017-11-16 14:17:08 +00:00
firmware firmware: Restore support for built-in firmware 2017-09-16 10:58:48 -07:00
fs Various SMB3 fixes for 4.14 and stable 2017-10-28 08:39:35 -07:00
include Merge airlied/drm-next into drm-intel-next-queued 2017-11-14 07:43:00 -08:00
init kbuild: Fix optimization level choice default 2017-10-07 20:08:05 +09:00
ipc fix a typo in put_compat_shm_info() 2017-09-25 20:41:46 -04:00
kernel Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-10-29 08:11:49 -07:00
lib Linux 4.14-rc7 2017-11-02 12:40:41 +10:00
mm Linux 4.14-rc7 2017-11-02 12:40:41 +10:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-10-29 08:11:49 -07:00
samples Fix tracing sample code warning. 2017-10-27 20:35:31 -07:00
scripts Linux 4.14-rc7 2017-11-02 12:40:41 +10:00
security Revert "apparmor: add base infastructure for socket mediation" 2017-10-26 19:35:35 +02:00
sound Merge branch 'linus-4.14-rc4-acp-prereq' of git://people.freedesktop.org/~agd5f/linux into drm-next 2017-11-14 05:53:39 +10:00
tools Linux 4.14-rc7 2017-11-02 12:40:41 +10:00
usr ramfs: clarify help text that compression applies to ramfs as well as legacy ramdisk. 2017-07-06 16:24:30 -07:00
virt Revert "KVM: Don't accept obviously wrong gsi values via KVM_IRQFD" 2017-09-19 08:37:17 +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 kbuild: Add support to generate LLVM assembly files 2017-04-25 08:13:52 +09:00
.mailmap Update James Hogan's email address 2017-10-04 17:11:53 -07:00
COPYING
CREDITS selinux/stable-4.14 PR 20170831 2017-09-12 13:21:00 -07:00
Kbuild kbuild: Consolidate header generation from ASM offset information 2017-04-13 05:43:37 +09:00
Kconfig
MAINTAINERS Linux 4.14-rc7 2017-11-02 12:40:41 +10:00
Makefile Linux 4.14-rc7 2017-10-29 13:58:38 -07:00
README README: add a new README file, pointing to the Documentation/ 2016-10-24 08:12:35 -02:00

README

Linux kernel
============

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

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.