Spotlight | Reviews | Current Issue | Newsletter | Subscribe | Contact |
Departments

Partner Links
Website builder
WinWeb OnlineOffice
Shopping and price comparison with product reviews at dooyoo.co.uk

user friendly

CeBIT 2010 CFP

Linux Magazine is offering free booths for the CeBIT 2010 computer fair to selected open source projects. Apply Now!

  linux-magazine.com » Online » News » Update: Security Hole in Kernel Allows Privilege Extensions  

Print this page. Recommend
Slashdot it! Delicious Share on Facebook Tweet! Digg

Update: Security Hole in Kernel Allows Privilege Extensions

A null-pointer dereference in the Linux kernel allows local users to assume root privileges. Brad Spengler, who claims first discovery, announced that he will present a corresponding exploit during the course of the day.

Concurrent with Spengler's discovery in mid-October, Earl Chew likewise brought attention to the bug in an lkml.org blog. The bug affects all kernel versions in the 2.6 series and was fixed in the upcoming 2.6.32 RC. So far Red Hat is the only distro providing patches for what is now the CVE-2009-3547 advisory. Users of other distros can apply a workaround that sets the pointer to a value higher than zero, which prevents the exploit. Admins can enter

# cat /proc/sys/vm/mmap_min_addr

to read the current pointer value. If larger than zero, no action need be taken, otherwise use the command

# sysctl -w vm.mmap_min_addr="4096"

to set the value to 4096, for example. The value, however, is only good until the next reboot. To give it a more lasting value, users of Debian or its derivatives should use the following commands:

# echo "vm.mmap_min_addr = 4096" > /etc/sysctl.d/mmap_min_addr.conf
# /etc/init.d/procps restart

Users of openSUSE should use the following command instead:

# echo -e "\nvm.mmap_min_addr=4096\n" >> /etc/sysctl.conf

followed by a system reboot.

First indications are that Ubuntu/Kubuntu 9.10 are not affected by the bug, because the initial counter is set to 65535. However, subsequently installed programs such as Wine or Qemu will reset the counter to zero. First tests with Wine installations show this to be evident. The openSUSE distro is potentially the most vulnerable in that the initial counter is also set to zero.

(Thomas Leichtenstern)

Comments

get root

phil Nov 18, 2009 3:04am GMT

sudo -s

sudo echo

JR Nov 10, 2009 10:54am GMT

You can't 'sudo echo > outputfile'. Then echo gets called with superuser privileges, but the actual output gets piped to outputfile with normal user privileges and fails.

The correct way would be to either use 'sudo -i' or 'sudo su' to enter a true root shell, or to use tee.

$ echo "vm.mmap_min_addr = 4096" | sudo tee /etc/sysctl.d/mmap_min_addr.conf

Add the argument -a to tee to make it append the echoed line to the end of the file. Merely using tee like above will replace the file if it exists with the new content.

Article update

Britta Wuelfing Nov 10, 2009 9:49am GMT

Due to some formatting problems the commands have not been shown correctly as in the original article. The article has been updated. We apologize for the inconvinience!

wrong code

Alex Nov 10, 2009 9:06am GMT

Please, remove <br> from code

echo "vm.mmap_min_addr = 4096" > /etc/sysctl.d/mmap_min_addr.conf<br>
/etc/init.d/procps restart

This tag doesn't allow to run commands in case of copy/paste in terminal.

If you have wine installed the instructions are a bit different

Kory Nov 09, 2009 11:13pm GMT

Check if you have a file here:
/etc/sysctl.d/wine.sysctl.conf

If so, modify the statement in there from:
vm.mmap_min_addr = 0

to:
vm.mmap_min_addr = 1024
OR
vm.mmap_min_addr = 4096

Then run:
sudo /etc/init.d/procps restart

Then check it with the cat:
cat /proc/sys/vm/mmap_min_addr

Permanent fix in Ubuntu

David Waine Nov 09, 2009 10:54pm GMT

The permanent fix work in ubuntu but you need to get to a root terminal window:

# sudo gnome-terminal

Then enter the commands in this new terminal.

Ubuntu/Debian NON-EXPERTS: For a quick and easy WORKING fix.....

Martini1179 Nov 09, 2009 11:44am GMT

Ubuntu/Debian non-admin, non-experts can go to:

http://wiki.debian.org/mmap_min_addr

for well-written, working instructions.

The article on THIS page was incredibly disappointing because it assumes expert Linux terminal command knowledge. I literally wasted half an hour of my existence trying to figure out what I was doing wrong. Went to the site above, cut/paste x 2, done.

sudo

Alex Nov 08, 2009 11:00pm GMT

Martini1179, try "sudo -i" and then enter those commands.

...and

Martini1179 Nov 08, 2009 9:05pm GMT

...and I checked the value and it IS at zero. I have Wine installed.

Terminal commands DO NOT work in Ubuntu Jaunty

Martini1179 Nov 08, 2009 9:03pm GMT

The terminal commands for the more permanent don't work in Ubuntu Jaunty. Whatever I do, I get a "permission denied" error, sudo or no sudo. It doesn't even ask for a sudo password.

Print this page. Recommend
Slashdot it! Delicious Share on Facebook Tweet! Digg
Related Articles
Kernel Bug Lay Undiscovered for Eight Years
HP Mini Mi Linux Netbook Released
Linus Torvalds Upset over Ext3 and Ext4
Ubuntu 8.10 Alpha 2 with New Kernel
Ubuntu 8.10 Seeking Beta Testers
USENIX LISA: Ted T'so Helps with System Crashes and Presents SystemTap
Rikki's Open Source Exchange

Stop by Rikki's Open Source Exchange for dispatches from the world of women in open source.

Rikki Kite examines the experience of women across the spectrum of open source –
the people, projects, organizations, events, articles, issues, and news.

more...

 

In the US and Canada, Linux Magazine is known as Linux Pro Magazine.
Entire contents © 2009 [Linux New Media USA, LLC]
Linux New Media web sites:
North America: [Linux Pro Magazine]
UK/Worldwide: [Linux Magazine]
Germany: [Linux-Magazin] [LinuxUser] [EasyLinux] [Linux-Community] [Linux Technical Review]
Eastern Europe: [Linux Magazine Poland] [Linux Community Poland] [Open Source DVD Poland]
International: [Linux Magazine Brazil] [EasyLinux Brazil] [Linux Magazine Spanish]
Corporate: [Linux New Media AG]