Rapid7 Vulnerability & Exploit Database

Local Privilege Escalation via CVE-2023-0386

Back to Search

Local Privilege Escalation via CVE-2023-0386

Disclosed
03/22/2023
Created
09/27/2024

Description

This exploit targets the Linux kernel bug in OverlayFS. A flaw was found in the Linux kernel, where unauthorized access to the execution of the setuid file with capabilities was found in the Linux kernel’s OverlayFS subsystem in how a user copies a capable file from a nosuid mount into another mount. This uid mapping bug allows a local user to escalate their privileges on the system.

Author(s)

  • xkaneiki
  • sxlmnwb
  • Takahiro Yokoyama

Platform

Linux

Architectures

x64

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/linux/local/cve_2023_0386_overlayfs_priv_esc
msf exploit(cve_2023_0386_overlayfs_priv_esc) > show targets
    ...targets...
msf exploit(cve_2023_0386_overlayfs_priv_esc) > set TARGET < target-id >
msf exploit(cve_2023_0386_overlayfs_priv_esc) > show options
    ...show and set options...
msf exploit(cve_2023_0386_overlayfs_priv_esc) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;