Re: [ Linux kernel ] Exploitable bugs in drivers/media/platform/vivid

Related Vulnerabilities: CVE-2019-18683  
                							

                <!--X-Body-Begin-->
<!--X-User-Header-->

oss-sec
mailing list archives
<!--X-User-Header-End-->
<!--X-TopPNI-->

By Date

By Thread

</form>

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
Re: [ Linux kernel ] Exploitable bugs in drivers/media/platform/vivid

<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->

From: Salvatore Bonaccorso &lt;carnil () debian org&gt;

Date: Tue, 5 Nov 2019 08:07:30 +0100

<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->

<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
Hi,

On Sat, Nov 02, 2019 at 10:27:27PM +0300, Alexander Popov wrote:
Hello!

I used the syzkaller fuzzer with custom modifications and found a bunch of
5-year old bugs in the Linux kernel. I managed to exploit one of them for a
local privilege escalation.

These vulnerabilities are caused by wrong mutex locking in the vivid driver of
the V4L2 subsystem. Please see the fixing patch that I've just sent to LKML:
https://lore.kernel.org/lkml/20191102190327.24903-1-alex.popov () linux com/

The vivid driver doesn't require any special hardware. It is shipped in Ubuntu,
Debian, Arch Linux, SUSE Linux Enterprise and openSUSE.

On Ubuntu the devices created by this driver are available to the normal user,
since Ubuntu applies RW ACL when the user is logged in:
  a13x@ubuntu_server_1804:~$ getfacl /dev/video0
  getfacl: Removing leading '/' from absolute path names
  # file: dev/video0
  # owner: root
  # group: video
  user::rw-
  user:a13x:rw-
  group::rw-
  mask::rw-
  other::---

(Un)fortunately, I don't know how to autoload the vulnerable driver, which
limits the severity of these vulnerabilities. That's why the Linux kernel
security team allows me to do the full disclosure.

But there is an interesting aspect -- my PoC exploit bypasses SMEP and SMAP on
the fresh Ubuntu Server 18.04. Moreover, it gains the local privilege escalation
from the kthread context (where the userspace is not mapped). I'm going to share
the details about the exploit techniques later.

For now I would recommend to blacklist the vivid kernel module on your machines.

CVE-2019-18683 was assigned for this issue.

Regards,
Salvatore

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->

<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->

By Date

By Thread

Current thread:

Re: [ Linux kernel ] Exploitable bugs in drivers/media/platform/vivid Salvatore Bonaccorso (Nov 04)

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->