<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/android_kernel_m2note/drivers/media, branch ng-7.1.2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://gitea.privatedns.org/xavi/android_kernel_m2note/atom?h=ng-7.1.2</id>
<link rel='self' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/atom?h=ng-7.1.2'/>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/'/>
<updated>2019-05-02T13:57:24+00:00</updated>
<entry>
<title>media: uvcvideo: Prevent heap overflow when accessing mapped controls</title>
<updated>2019-05-02T13:57:24+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2017-08-08T12:56:21+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=bf72013b84bcc8e0f26f65f8354f7d7861d044b3'/>
<id>urn:sha1:bf72013b84bcc8e0f26f65f8354f7d7861d044b3</id>
<content type='text'>
commit 7e09f7d5c790278ab98e5f2c22307ebe8ad6e8ba upstream.

The size of uvc_control_mapping is user controlled leading to a
potential heap overflow in the uvc driver. This adds a check to verify
the user provided size fits within the bounds of the defined buffer
size.

Originally-from: Richard Simmons &lt;rssimmo@amazon.com&gt;

Change-Id: Iecff8a3172e2096379d647ba4373cbd0b35d7479
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "GCC: Fix up for gcc 5+"</title>
<updated>2018-11-29T23:02:49+00:00</updated>
<author>
<name>Moyster</name>
<email>oysterized@gmail.com</email>
</author>
<published>2018-11-29T22:59:26+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=be2a1194e40a49e08b28bc415e5126b0a99e1194'/>
<id>urn:sha1:be2a1194e40a49e08b28bc415e5126b0a99e1194</id>
<content type='text'>
This reverts commit ff505baaf412985af758d5820cd620ed9f1a7e05.
</content>
</entry>
<entry>
<title>Replace &lt;asm/uaccess.h&gt; with &lt;linux/uaccess.h&gt; globally</title>
<updated>2018-11-29T16:49:05+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-12-24T19:46:01+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=8588b01909e0145e5e84f5fe0a5353bd194f205c'/>
<id>urn:sha1:8588b01909e0145e5e84f5fe0a5353bd194f205c</id>
<content type='text'>
This was entirely automated, using the script by Al:

  PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*&lt;asm/uaccess.h&gt;'
  sed -i -e "s!$PATT!#include &lt;linux/uaccess.h&gt;!" \
        $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h)

to do the replacement at the end of the merge window.

Requested-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Moyster &lt;oysterized@gmail.com&gt;
</content>
</entry>
<entry>
<title>GCC: Fix up for gcc 5+</title>
<updated>2018-11-29T11:38:19+00:00</updated>
<author>
<name>mydongistiny</name>
<email>jaysonedson@gmail.com</email>
</author>
<published>2015-11-24T01:01:42+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=ff505baaf412985af758d5820cd620ed9f1a7e05'/>
<id>urn:sha1:ff505baaf412985af758d5820cd620ed9f1a7e05</id>
<content type='text'>
Signed-off-by: mydongistiny &lt;jaysonedson@gmail.com&gt;
Signed-off-by: Mister Oyster &lt;oysterized@gmail.com&gt;
</content>
</entry>
<entry>
<title>v4l2: Refactor, fix security bug in compat ioctl32</title>
<updated>2017-12-14T16:26:48+00:00</updated>
<author>
<name>Daniel Mentz</name>
<email>danielmentz@google.com</email>
</author>
<published>2017-07-19T23:03:19+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=b70a26cc0275b1ed647ef79c8d0bfa1e109f5bc1'/>
<id>urn:sha1:b70a26cc0275b1ed647ef79c8d0bfa1e109f5bc1</id>
<content type='text'>
The 32-bit compat v4l2 ioctl is implemented based on its 64-bit
equivalent. It converts 32-bit data structures into its 64-bit
equivalents and needs to provide the data to the 64-bit ioctl in user
space memory which is commonly allocated using
compat_alloc_user_space(). However, due to how that function is
implemented, it can only be called a single time for every syscall
invocation.  Supposedly to avoid this limitation, the existing code uses
a mix of memory from the kernel stack and memory allocated through
compat_alloc_user_space(). Under normal circumstances, this would not
work, because the 64-bit ioctl expects all pointers to point to user
space memory. As a workaround, set_fs(KERNEL_DS) is called to
temporarily disable this extra safety check and allow kernel pointers.
However, this might introduce a security vulnerability: The
result of the 32-bit to 64-bit conversion is writeable by user space
because the output buffer has been allocated via
compat_alloc_user_space(). A malicious user space process could then
manipulate pointers inside this output buffer, and due to the previous
set_fs(KERNEL_DS) call, functions like get_user() or put_user() no longer
prevent kernel memory access.

The new approach is to pre-calculate the total amount of user space
memory that is needed, allocate it using compat_alloc_user_space() and
then divide up the allocated memory to accommodate all data structures
that need to be converted.

An alternative approach would have been to retain the union type karg
that they allocated on the kernel stack in do_video_ioctl(), copy all
data from user space into karg and then back to user space. However,
we decided against this approach because it does not align with other
compat syscall implementations. Instead, we tried to replicate the
get_user/put_user pairs as found in other places in the kernel:

if (get_user(clipcount, &amp;up-&gt;clipcount) ||
    put_user(clipcount, &amp;kp-&gt;clipcount)) return -EFAULT;

BUG: 34624167
Change-Id: Ica92695d8ddf60c0a067ea2f833f22a71710932e
Signed-off-by: Daniel Mentz &lt;danielmentz@google.com&gt;
Reported-by: C0RE Team
Signed-off-by: Mister Oyster &lt;oysterized@gmail.com&gt;
</content>
</entry>
<entry>
<title>v4l2-compat-ioctl32: Add support for private buffers</title>
<updated>2017-12-14T16:18:18+00:00</updated>
<author>
<name>Satish Kodishala</name>
<email>skodisha@codeaurora.org</email>
</author>
<published>2014-05-09T06:09:06+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=c4fd5633f12890814abace672c71423eb6803e77'/>
<id>urn:sha1:c4fd5633f12890814abace672c71423eb6803e77</id>
<content type='text'>
Add support for copying length and userptr fields from user
space private buffers to kernel space and vice versa.

Change-Id: Ia7d41aa312544bb0960670af58623b0dc0435a8a
Signed-off-by: Satish Kodishala &lt;skodisha@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>ir-core: fix gcc-7 warning on bool arithmetic</title>
<updated>2017-11-06T14:33:11+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2017-05-11T11:46:44+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=7b94f578bd1823895ccc44785a885c191d362b34'/>
<id>urn:sha1:7b94f578bd1823895ccc44785a885c191d362b34</id>
<content type='text'>
commit bd7e31bbade02bc1e92aa00d5cf2cee2da66838a upstream.

gcc-7 suggests that an expression using a bitwise not and a bitmask
on a 'bool' variable is better written using boolean logic:

drivers/media/rc/imon.c: In function 'imon_incoming_scancode':
drivers/media/rc/imon.c:1725:22: error: '~' on a boolean expression [-Werror=bool-operation]
    ictx-&gt;pad_mouse = ~(ictx-&gt;pad_mouse) &amp; 0x1;
                      ^
drivers/media/rc/imon.c:1725:22: note: did you mean to use logical not?

I agree.

Fixes: 21677cfc562a ("V4L/DVB: ir-core: add imon driver")

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>pvrusb2: reduce stack usage pvr2_eeprom_analyze()</title>
<updated>2017-11-06T14:30:42+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2017-02-02T14:53:04+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=1a1419f93129caa97a43145313bc1f65d414512b'/>
<id>urn:sha1:1a1419f93129caa97a43145313bc1f65d414512b</id>
<content type='text'>
commit 6830733d53a4517588e56227b9c8538633f0c496 upstream.

The driver uses a relatively large data structure on the stack, which
showed up on my radar as we get a warning with the "latent entropy"
GCC plugin:

drivers/media/usb/pvrusb2/pvrusb2-eeprom.c:153:1: error: the frame size of 1376 bytes is larger than 1152 bytes [-Werror=frame-larger-than=]

The warning is usually hidden as we raise the warning limit to 2048
when the plugin is enabled, but I'd like to lower that again in the
future, and making this function smaller helps to do that without
build regressions.

Further analysis shows that putting an 'i2c_client' structure on
the stack is not really supported, as the embedded 'struct device'
is not initialized here, and we are only saved by the fact that
the function that is called here does not use the pointer at all.

Fixes: d855497edbfb ("V4L/DVB (4228a): pvrusb2 to kernel 2.6.18")

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>media: platform: davinci: return -EINVAL for VPFE_CMD_S_CCDC_RAW_PARAMS ioctl</title>
<updated>2017-11-06T14:26:30+00:00</updated>
<author>
<name>Prabhakar Lad</name>
<email>prabhakar.csengg@gmail.com</email>
</author>
<published>2017-07-20T12:02:09+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=f07aaebdae10eddbbd4b12c2fa3de7b1965c576a'/>
<id>urn:sha1:f07aaebdae10eddbbd4b12c2fa3de7b1965c576a</id>
<content type='text'>
commit da05d52d2f0f6bd61094a0cd045fed94bf7d673a upstream.

this patch makes sure VPFE_CMD_S_CCDC_RAW_PARAMS ioctl no longer works
for vpfe_capture driver with a minimal patch suitable for backporting.

- This ioctl was never in public api and was only defined in kernel header.
- The function set_params constantly mixes up pointers and phys_addr_t
  numbers.
- This is part of a 'VPFE_CMD_S_CCDC_RAW_PARAMS' ioctl command that is
  described as an 'experimental ioctl that will change in future kernels'.
- The code to allocate the table never gets called after we copy_from_user
  the user input over the kernel settings, and then compare them
  for inequality.
- We then go on to use an address provided by user space as both the
  __user pointer for input and pass it through phys_to_virt to come up
  with a kernel pointer to copy the data to. This looks like a trivially
  exploitable root hole.

Due to these reasons we make sure this ioctl now returns -EINVAL and backport
this patch as far as possible.

Fixes: 5f15fbb68fd7 ("V4L/DVB (12251): v4l: dm644x ccdc module for vpfe capture driver")

Signed-off-by: Lad, Prabhakar &lt;prabhakar.csengg@gmail.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;      # for v3.7 and up
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>Merge mediatek security patches</title>
<updated>2017-08-20T12:45:21+00:00</updated>
<author>
<name>fire855</name>
<email>thefire855@gmail.com</email>
</author>
<published>2017-08-19T18:57:37+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=436d8fbbd678c1cb755c744e7176e83786fac28c'/>
<id>urn:sha1:436d8fbbd678c1cb755c744e7176e83786fac28c</id>
<content type='text'>
* Revert : Merge mediatek security patches (14326e25d3fc3b4d780c2d9d2eebbe3231ad5376)
* Reapply : 14326e25d3fc3b4d780c2d9d2eebbe3231ad5376

Signed-off-by: Mister Oyster &lt;oysterized@gmail.com&gt;
</content>
</entry>
</feed>
