<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/media/radio, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.1.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-07-26T07:12:29Z</updated>
<entry>
<title>media: wl128x: Fix some error handling in fm_v4l2_init_video_device()</title>
<updated>2019-07-26T07:12:29Z</updated>
<author>
<name>Kefeng Wang</name>
</author>
<published>2019-05-30T07:25:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b46ef18cb8ded747c2d9f8fce626528aba876fcd'/>
<id>urn:sha1:b46ef18cb8ded747c2d9f8fce626528aba876fcd</id>
<content type='text'>
[ Upstream commit 69fbb3f47327d959830c94bf31893972b8c8f700 ]

X-Originating-IP: [10.175.113.25]
X-CFilter-Loop: Reflected
The fm_v4l2_init_video_device() forget to unregister v4l2/video device
in the error path, it could lead to UAF issue, eg,

  BUG: KASAN: use-after-free in atomic64_read include/asm-generic/atomic-instrumented.h:836 [inline]
  BUG: KASAN: use-after-free in atomic_long_read include/asm-generic/atomic-long.h:28 [inline]
  BUG: KASAN: use-after-free in __mutex_unlock_slowpath+0x92/0x690 kernel/locking/mutex.c:1206
  Read of size 8 at addr ffff8881e84a7c70 by task v4l_id/3659

  CPU: 1 PID: 3659 Comm: v4l_id Not tainted 5.1.0 #8
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014
  Call Trace:
   __dump_stack lib/dump_stack.c:77 [inline]
   dump_stack+0xa9/0x10e lib/dump_stack.c:113
   print_address_description+0x65/0x270 mm/kasan/report.c:187
   kasan_report+0x149/0x18d mm/kasan/report.c:317
   atomic64_read include/asm-generic/atomic-instrumented.h:836 [inline]
   atomic_long_read include/asm-generic/atomic-long.h:28 [inline]
   __mutex_unlock_slowpath+0x92/0x690 kernel/locking/mutex.c:1206
   fm_v4l2_fops_open+0xac/0x120 [fm_drv]
   v4l2_open+0x191/0x390 [videodev]
   chrdev_open+0x20d/0x570 fs/char_dev.c:417
   do_dentry_open+0x700/0xf30 fs/open.c:777
   do_last fs/namei.c:3416 [inline]
   path_openat+0x7c4/0x2a90 fs/namei.c:3532
   do_filp_open+0x1a5/0x2b0 fs/namei.c:3563
   do_sys_open+0x302/0x490 fs/open.c:1069
   do_syscall_64+0x9f/0x450 arch/x86/entry/common.c:290
   entry_SYSCALL_64_after_hwframe+0x49/0xbe
  RIP: 0033:0x7f8180c17c8e
  ...
  Allocated by task 3642:
   set_track mm/kasan/common.c:87 [inline]
   __kasan_kmalloc.constprop.3+0xa0/0xd0 mm/kasan/common.c:497
   fm_drv_init+0x13/0x1000 [fm_drv]
   do_one_initcall+0xbc/0x47d init/main.c:901
   do_init_module+0x1b5/0x547 kernel/module.c:3456
   load_module+0x6405/0x8c10 kernel/module.c:3804
   __do_sys_finit_module+0x162/0x190 kernel/module.c:3898
   do_syscall_64+0x9f/0x450 arch/x86/entry/common.c:290
   entry_SYSCALL_64_after_hwframe+0x49/0xbe

  Freed by task 3642:
   set_track mm/kasan/common.c:87 [inline]
   __kasan_slab_free+0x130/0x180 mm/kasan/common.c:459
   slab_free_hook mm/slub.c:1429 [inline]
   slab_free_freelist_hook mm/slub.c:1456 [inline]
   slab_free mm/slub.c:3003 [inline]
   kfree+0xe1/0x270 mm/slub.c:3958
   fm_drv_init+0x1e6/0x1000 [fm_drv]
   do_one_initcall+0xbc/0x47d init/main.c:901
   do_init_module+0x1b5/0x547 kernel/module.c:3456
   load_module+0x6405/0x8c10 kernel/module.c:3804
   __do_sys_finit_module+0x162/0x190 kernel/module.c:3898
   do_syscall_64+0x9f/0x450 arch/x86/entry/common.c:290
   entry_SYSCALL_64_after_hwframe+0x49/0xbe

Add relevant unregister functions to fix it.

Cc: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Kefeng Wang &lt;wangkefeng.wang@huawei.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: wl128x: prevent two potential buffer overflows</title>
<updated>2019-05-31T13:43:45Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2019-03-26T05:12:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7e8750d0c2b2e22b1fe9de69b698dfa682174fe9'/>
<id>urn:sha1:7e8750d0c2b2e22b1fe9de69b698dfa682174fe9</id>
<content type='text'>
[ Upstream commit 9c2ccc324b3a6cbc865ab8b3e1a09e93d3c8ade9 ]

Smatch marks skb-&gt;data as untrusted so it warns that "evt_hdr-&gt;dlen"
can copy up to 255 bytes and we only have room for two bytes.  Even
if this comes from the firmware and we trust it, the new policy
generally is just to fix it as kernel hardenning.

I can't test this code so I tried to be very conservative.  I considered
not allowing "evt_hdr-&gt;dlen == 1" because it doesn't initialize the
whole variable but in the end I decided to allow it and manually
initialized "asic_id" and "asic_ver" to zero.

Fixes: e8454ff7b9a4 ("[media] drivers:media:radio: wl128x: FM Driver Common sources")

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: a few more typos at staging, pci, platform, radio and usb</title>
<updated>2019-03-01T15:02:25Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2019-03-01T15:01:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=26b190053ec0db030697e2e19a8f8f13550b9ff7'/>
<id>urn:sha1:26b190053ec0db030697e2e19a8f8f13550b9ff7</id>
<content type='text'>
Those typos were left over from codespell check, on
my first pass or belong to code added after the time I
ran it.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: radio: fix several typos</title>
<updated>2019-03-01T14:26:50Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2019-02-18T19:28:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bf7ad539459d39962f3fca749d61bbc731fd81ea'/>
<id>urn:sha1:bf7ad539459d39962f3fca749d61bbc731fd81ea</id>
<content type='text'>
Use codespell to fix lots of typos over frontends.

Manually verified to avoid false-positives.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: wl128x: fix spelling mistake: "Swtich" -&gt; "Switch"</title>
<updated>2019-02-18T17:32:43Z</updated>
<author>
<name>Colin Ian King</name>
</author>
<published>2019-02-17T22:26:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e3e71be056df8309c80ed7457122b726172c45a1'/>
<id>urn:sha1:e3e71be056df8309c80ed7457122b726172c45a1</id>
<content type='text'>
There is a spelling mistake in a fmdbg debug message. Fix it.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: si470x-i2c: Add optional reset-gpio support</title>
<updated>2019-01-21T17:36:18Z</updated>
<author>
<name>Pawe? Chmiel</name>
</author>
<published>2018-12-07T13:58:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1c64222be9ad0e56ad9a222b35e063d481f58cfc'/>
<id>urn:sha1:1c64222be9ad0e56ad9a222b35e063d481f58cfc</id>
<content type='text'>
If reset-gpio is defined, use it to bring device out of reset.
Without this, it's not possible to access si470x registers.

Signed-off-by: Pawe? Chmiel &lt;pawel.mikolaj.chmiel@gmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: si470x-i2c: Use managed resource helpers</title>
<updated>2019-01-21T17:35:26Z</updated>
<author>
<name>Pawe? Chmiel</name>
</author>
<published>2018-12-07T13:58:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f86c51b66bf6a066190035594965a1a9c661b4e4'/>
<id>urn:sha1:f86c51b66bf6a066190035594965a1a9c661b4e4</id>
<content type='text'>
Simplify cleanup of failures by using managed resource helpers

Signed-off-by: Pawe? Chmiel &lt;pawel.mikolaj.chmiel@gmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: si470x-i2c: Add device tree support</title>
<updated>2019-01-21T17:34:16Z</updated>
<author>
<name>Pawe? Chmiel</name>
</author>
<published>2018-12-07T13:58:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=95f9db59d856010e5c28813263fbdd7d70159f77'/>
<id>urn:sha1:95f9db59d856010e5c28813263fbdd7d70159f77</id>
<content type='text'>
This commit enables device tree support adding simple of_match table.

Signed-off-by: Pawe? Chmiel &lt;pawel.mikolaj.chmiel@gmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: replace strcpy() by strscpy()</title>
<updated>2018-09-11T17:32:17Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2018-09-10T20:20:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cc1e6315e83db0e517dd9279050b88adc83a7eba'/>
<id>urn:sha1:cc1e6315e83db0e517dd9279050b88adc83a7eba</id>
<content type='text'>
The strcpy() function is being deprecated upstream. Replace
it by the safer strscpy().

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
Reviewed-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: use strscpy() instead of strlcpy()</title>
<updated>2018-09-11T17:32:17Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2018-09-10T12:19:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c0decac19da3906d9b66291e57b7759489e1170f'/>
<id>urn:sha1:c0decac19da3906d9b66291e57b7759489e1170f</id>
<content type='text'>
The implementation of strscpy() is more robust and safer.

That's now the recommended way to copy NUL terminated strings.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
</content>
</entry>
</feed>
