|
|
| |
|
| |
Security
By Jake Edge March 2, 2011
The /tmp directory has been an unceasing source of security
problems going back decades; there are still regular
reports of vulnerabilities from insecure usage of temporary files. Part of
the problem is that /tmp (and /var/tmp) are shared
resources that can be written to by any process, which allows attackers to
use various
race conditions (typically time-of-check-to-time-of-use (TOCTTOU) races) in
insecurely written programs to elevate their privileges. It is a bit
ironic, then, that a utility specifically geared toward running a program
with a private /tmp directory (for application sandboxing) would
run afoul of a somewhat different kind of temporary file
vulnerability—one that was long-ago excised by the advent of "sticky"
directories. But that is just
what Tavis Ormandy found.
The basic problem is that insecure programs often open files in
/tmp after checking to see whether the file exists. In the window
between the time that the test is done and the time that the file is
opened, a malicious program can swap in a file of its choosing (or, more
likely, a symbolic or hard link to a file of its choosing). When that
happens, the
buggy program is operating on a file that it does not expect and that
can cause
all manner of mayhem. For normally privileged programs, that mayhem is
largely restricted, but for setuid programs, it can lead to full system
compromise.
Long ago, attackers could use the world-writable attribute of /tmp
to delete files that were created by setuid programs. The attacker could
then replace the file with a link, and when a privileged program
re-opened the file—something that is, in general, a bad practice with
temporary files—it would be opening a file of the attacker's
choice. But, the advent of
the "sticky" bit as applied to directory permissions closed that
loophole by only allowing the file owner (or root) to delete a file in a
sticky directory. Since that time, lots of code has been written with a
sticky /tmp directory in mind.
As part of its efforts to use SELinux to provide application sandboxes, Red
Hat created the seunshare utility. That utility will run a
command with alternate /tmp and home directories, along with a
given SELinux context. seunshare will "unshare" the default
mount namespace (so that the command has its own view of the filesystem
hierarchy), mount the specified
directories over top of /tmp and the home directory, and instruct
the kernel to execute the command in the (optionally) given SELinux
context. Since the temporary directory specified is under the control of
the user, it doesn't necessarily have the sticky bit set, which leads to
the vulnerability.
In Ormandy's example, he uses ksu to show how the
/etc/passwd file could be overwritten by running ksu under
seunshare. There are likely other setuid programs that make the
assumption that their temporary files are in sticky directories, and quite
possibly some where the consequences could be more severe than just
trashing the password file. So a mechanism that was meant to provide
more security actually left a hole behind. Unfortunately, this is
not an uncommon occurrence in the security
realm.
This particular case also shows the value of disclosing security
vulnerabilities. Ormandy reported the bug back in
September and, though there was a flurry of discussion about it, that
discussion died off in late November (at least in the bug report). Things
didn't pick up again until Ormandy posted
a request for an update, along with notice that he was ready to publish
an advisory, on February 18. Hearing no complaint, he did so on February 23.
After that, the discussion picked up again, with solutions being proposed,
though no
fix is yet available for Fedora or RHEL. One has to wonder how long this
potential local privilege escalation might have languished had Ormandy not
released his advisory. As a temporary mitigation, Ormandy suggests
removing the setuid bit from seunshare or restricting access to
it. The solution that Dan Walsh has proposed removes the
-t tmpdir argument to seunshare and instead mounts a
tmpfs on /tmp (with the sticky bit set). Presumably that
will be released in the near future.
There has been an attempt to harden the
behavior of sticky directories to try to avoid some of the longstanding
/tmp directory problems—though that would not have thwarted
this particular vulnerability because it relies on the directory being
sticky. There has been resistance to that effort because it is seen as
something of an ugly hack to work around badly written code, so it has not
made it into the mainline (though Ubuntu and other kernels do have that
hardening). But temporary file vulnerabilities of various sorts still rear
their head with depressing frequency. We will undoubtedly see others crop
up in the future.
Comments (6 posted)
Brief items
Sometimes, when I'm in a fanciful mood, I enjoy devices like brain-scanning
lie detectors, and hi-tech sniffer dogs, because their appeal speaks to our
desire for simple mechanical explanations in a complex world, and for
machines to aggrandise intuition, or make it more sciencey. But I enjoy
them mostly because - like the ridiculous new porno-scanners in US
airports, that give staff a view of your breasts and penis - they show how
much of security is about theatre rather than reality.
-- Ben
Goldacre (Thanks to Felipe Sateler.)
The constitutionality of state and federal information privacy laws have
historically and consistently been called into question, and things would
be no different if—and it's a big if—Congress grants the FTC
[Federal Trade Commission] authority
over online tracking. When considering technical standards and what
"tracking" means, it's worth keeping in mind the possible constitutional
challenges insofar as state action may be involved, as some desirable
options to curb online tracking may only be possible within a voluntary or
self-regulatory framework.
-- Harlan
Yu in the Freedom to Tinker blog
While "scare 'em and snare 'em" may be business as usual in the IT security
industry, other HBGary Federal skunk works projects clearly crossed a line:
a proposal for a major U.S. bank, allegedly Bank of America, to launch
offensive cyber attacks on the servers that host the whistle blower site
Wikileaks. HBGary was part of a triumvirate of firms that also included
Palantir Inc and Berico Technologies, that was working with the law firm of
the U.S. Chamber of Commerce to develop plans to target progressive groups,
labor unions and other left-leaning non profits who the Chamber opposed
with a campaign of false information and entrapment.
-- Paul
Roberts at threatpost.com
Comments (1 posted)
Over at the Freedom to Tinker blog, Dan Wallach reports on an experiment he did with his undergraduate security class: using Wireshark and Mallory to listen in on what his Android phone was sending. He describes what was found for a number of different applications including Gmail, Google Voice and Calendar, Facebook, Twitter, Angry Birds, and more. " What options do Android users have, today, to protect themselves against eavesdroppers? Android does support several VPN configurations which you could configure before you hit the road. That won't stop the unnecessary transmission of your fine GPS coordinates, which, to my mind, neither SoundHound nor ShopSaavy have any business knowing. If that's an issue for you, you could turn off your GPS altogether, but you'd have to turn it on again later when you want to use maps or whatever else. Ideally, I'd like the Market installer to give me the opportunity to revoke GPS privileges for apps like these."
Comments (21 posted)
Mozilla has released Firefox 3.6.14 and
3.5.17 and Thunderbird 3.1.8, each of
which fix some security vulnerabilities, including some that are
marked "critical". Mozilla strongly recommends that all users upgrade to
the new releases. Each Firefox release fixes eight critical, one high, and
one moderate vulnerability (3.6.14,
3.5.17),
while the Thunderbird release fixes two critical, and one moderate flaw (3.1.8).
Comments (1 posted)
New vulnerabilities
abcm2ps: multiple vulnerabilities
Comments (none posted)
acroread: multiple vulnerabilities
| Package(s): | acroread |
CVE #(s): | CVE-2011-0562
CVE-2011-0563
CVE-2011-0565
CVE-2011-0566
CVE-2011-0567
CVE-2011-0585
CVE-2011-0586
CVE-2011-0587
CVE-2011-0589
CVE-2011-0590
CVE-2011-0591
CVE-2011-0592
CVE-2011-0593
CVE-2011-0594
CVE-2011-0595
CVE-2011-0596
CVE-2011-0598
CVE-2011-0599
CVE-2011-0600
CVE-2011-0602
CVE-2011-0603
CVE-2011-0604
CVE-2011-0606
|
| Created: | February 24, 2011 |
Updated: | May 13, 2011 |
| Description: |
From the Red Hat advisory:
A specially-crafted PDF file could cause Adobe Reader to crash or,
potentially, execute arbitrary code as the user running Adobe Reader when
opened. (CVE-2011-0562, CVE-2011-0563, CVE-2011-0565, CVE-2011-0566,
CVE-2011-0567, CVE-2011-0585, CVE-2011-0586, CVE-2011-0589, CVE-2011-0590,
CVE-2011-0591, CVE-2011-0592, CVE-2011-0593, CVE-2011-0594, CVE-2011-0595,
CVE-2011-0596, CVE-2011-0598, CVE-2011-0599, CVE-2011-0600, CVE-2011-0602,
CVE-2011-0603, CVE-2011-0606)
Multiple security flaws were found in Adobe reader. A specially-crafted PDF
file could cause cross-site scripting (XSS) attacks against the user
running Adobe Reader when opened. (CVE-2011-0587, CVE-2011-0604)
|
| Alerts: |
|
Comments (none posted)
avahi: denial of service
| Package(s): | avahi |
CVE #(s): | CVE-2011-1002
|
| Created: | February 24, 2011 |
Updated: | September 12, 2011 |
| Description: |
From the Mandriva advisory:
avahi-core/socket.c in avahi-daemon in Avahi before 0.6.29 allows
remote attackers to cause a denial of service (infinite loop) via
an empty (1) IPv4 or (2) IPv6 UDP packet to port 5353. NOTE: this
vulnerability exists because of an incorrect fix for CVE-2010-2244
(CVE-2011-1002).
|
| Alerts: |
|
Comments (none posted)
clamav: arbitrary code execution
| Package(s): | clamav |
CVE #(s): | CVE-2011-1003
|
| Created: | March 1, 2011 |
Updated: | April 1, 2011 |
| Description: |
From the Ubuntu advisory:
It was discovered that the Microsoft Office processing code in libclamav
improperly handled certain Visual Basic for Applications (VBA) data. This
could allow a remote attacker to craft a document that could crash clamav
or possibly execute arbitrary code.
|
| Alerts: |
|
Comments (none posted)
firefox: multiple vulnerabilities
| Package(s): | firefox |
CVE #(s): | CVE-2010-1585
CVE-2011-0051
CVE-2011-0053
CVE-2011-0054
CVE-2011-0055
CVE-2011-0056
CVE-2011-0057
CVE-2011-0058
CVE-2011-0059
CVE-2011-0061
CVE-2011-0062
|
| Created: | March 2, 2011 |
Updated: | May 2, 2011 |
| Description: |
From the Red Hat advisory:
A flaw was found in the way Firefox sanitized HTML content in extensions.
If an extension loaded or rendered malicious content using the
ParanoidFragmentSink class, it could fail to safely display the content,
causing Firefox to execute arbitrary JavaScript with the privileges of the
user running Firefox. (CVE-2010-1585)
A flaw was found in the way Firefox handled dialog boxes. An attacker could
use this flaw to create a malicious web page that would present a blank
dialog box that has non-functioning buttons. If a user closes the dialog
box window, it could unexpectedly grant the malicious web page elevated
privileges. (CVE-2011-0051)
Several flaws were found in the processing of malformed web content. A web
page containing malicious content could cause Firefox to crash or,
potentially, execute arbitrary code with the privileges of the user running
Firefox. (CVE-2011-0053, CVE-2011-0055, CVE-2011-0058, CVE-2011-0062)
Several flaws were found in the way Firefox handled malformed JavaScript. A
website containing malicious JavaScript could cause Firefox to execute that
JavaScript with the privileges of the user running Firefox. (CVE-2011-0054,
CVE-2011-0056, CVE-2011-0057)
A flaw was found in the way Firefox handled malformed JPEG images. A
website containing a malicious JPEG image could cause Firefox to crash or,
potentially, execute arbitrary code with the privileges of the user running
Firefox. (CVE-2011-0061)
A flaw was found in the way Firefox handled plug-ins that perform HTTP
requests. If a plug-in performed an HTTP request, and the server sent a 307
redirect response, the plug-in was not notified, and the HTTP request was
forwarded. The forwarded request could contain custom headers, which could
result in a Cross Site Request Forgery attack. (CVE-2011-0059) |
| Alerts: |
|
Comments (none posted)
fuse: denial of service
| Package(s): | fuse |
CVE #(s): | CVE-2011-0541
CVE-2011-0542
CVE-2011-0543
|
| Created: | March 1, 2011 |
Updated: | July 22, 2011 |
| Description: |
From the Ubuntu advisory:
It was discovered that FUSE would incorrectly follow symlinks when checking
mountpoints under certain conditions. A local attacker, with access to use
FUSE, could unmount arbitrary locations, leading to a denial of service.
|
| Alerts: |
|
Comments (none posted)
gimp: multiple vulnerabilities
| Package(s): | gimp |
CVE #(s): | CVE-2010-4540
CVE-2010-4541
CVE-2010-4542
CVE-2010-4543
|
| Created: | February 28, 2011 |
Updated: | September 28, 2012 |
| Description: |
From the Pardus advisory:
CVE-2010-4540 gimp LIGHTING EFFECTS > LIGHT plugin stack buffer overflow
CVE-2010-4541 gimp SPHERE DESIGNER plugin stack buffer overflow
CVE-2010-4542 gimp GFIG plugin stack buffer overflow
CVE-2010-4543 gimp heap overflow read_channel_data() in file-psp.c
|
| Alerts: |
|
Comments (none posted)
kernel: denial of service
| Package(s): | kernel |
CVE #(s): | CVE-2010-4251
|
| Created: | March 2, 2011 |
Updated: | July 5, 2011 |
| Description: |
From the Red Hat advisory:
A flaw was found in the Linux kernel's networking subsystem. If the
number of packets received exceeded the receiver's buffer limit, they were
queued in a backlog, consuming memory, instead of being discarded. A remote
attacker could abuse this flaw to cause a denial of service (out-of-memory
condition). |
| Alerts: |
|
Comments (none posted)
logwatch: privilege escalation/arbitrary code execution
| Package(s): | logwatch |
CVE #(s): | CVE-2011-1018
|
| Created: | March 1, 2011 |
Updated: | March 28, 2012 |
| Description: |
From the Ubuntu advisory:
Dominik George discovered that logwatch did not properly sanitize
log file names that were passed to the shell as part of a command.
If a remote attacker were able to generate specially crafted filenames
(for example, via Samba logging), they could execute arbitrary code
with root privileges.
|
| Alerts: |
|
Comments (none posted)
openjdk: privilege escalation
| Package(s): | openjdk-6 |
CVE #(s): | CVE-2011-0706
|
| Created: | March 1, 2011 |
Updated: | June 15, 2011 |
| Description: |
From the CVE entry:
The JNLPClassLoader class in IcedTea-Web before 1.0.1, as used in OpenJDK Runtime Environment 1.6.0, allows remote attackers to gain privileges via unknown vectors related to multiple signers and the assignment of "an inappropriate security descriptor." |
| Alerts: |
|
Comments (none posted)
pam-pgsql: buffer overflow
| Package(s): | pam-pgsql |
CVE #(s): | |
| Created: | February 28, 2011 |
Updated: | March 2, 2011 |
| Description: |
From the Debian advisory:
It was discovered that pam-pgsql, a PAM module to authenticate using
a PostgreSQL database, was vulnerable to a buffer overflow in supplied
IP-addresses.
|
| Alerts: |
|
Comments (none posted)
pango: arbitrary code execution
| Package(s): | pango |
CVE #(s): | CVE-2011-0064
|
| Created: | March 2, 2011 |
Updated: | April 1, 2011 |
| Description: |
From the Red Hat advisory:
It was discovered that Pango did not check for memory reallocation failures
in the hb_buffer_ensure() function. An attacker able to trigger a
reallocation failure by passing sufficiently large input to an application
using Pango could use this flaw to crash the application or, possibly,
execute arbitrary code with the privileges of the user running the
application. |
| Alerts: |
|
Comments (none posted)
php: casting vulnerability
| Package(s): | php |
CVE #(s): | CVE-2011-0708
|
| Created: | February 28, 2011 |
Updated: | January 19, 2012 |
| Description: |
From the Pardus advisory:
PHP Exif extension for 64bit platforms is affected by a casting
vulnerability that occurs during the image header parsing. |
| Alerts: |
|
Comments (none posted)
ruby: multiple vulnerabilities
| Package(s): | ruby |
CVE #(s): | CVE-2011-1004
CVE-2011-1005
|
| Created: | February 28, 2011 |
Updated: | March 8, 2013 |
| Description: |
From the Pardus advisory:
A symlink race condition vulnerability was found in
FileUtils.remove_entry_secure. The vulnerability allows local users to
delete arbitrary files and directories. (CVE-2011-1004)
Exception#to_s method can be used to trick $SAFE check, which makes a
untrusted codes to modify arbitrary strings. (CVE-2011-1005) |
| Alerts: |
|
Comments (none posted)
samba: denial of service
| Package(s): | samba |
CVE #(s): | CVE-2011-0719
|
| Created: | February 28, 2011 |
Updated: | May 3, 2011 |
| Description: |
From the Mandriva advisory:
All current released versions of Samba are vulnerable to a denial of
service caused by memory corruption. Range checks on file descriptors
being used in the FD_SET macro were not present allowing stack
corruption. This can cause the Samba code to crash or to loop
attempting to select on a bad file descriptor set. |
| Alerts: |
|
Comments (none posted)
wireshark: code execution
| Package(s): | wireshark |
CVE #(s): | CVE-2011-0713
|
| Created: | February 28, 2011 |
Updated: | April 19, 2011 |
| Description: |
From the Pardus advisory:
An attacker can invite the victim to open a DCT3 capture with Wireshark,
in order to create an overflow, leading to a denial of service or to
code execution.
|
| Alerts: |
|
Comments (none posted)
Page editor: Jake Edge
Next page: Kernel development>>
|
|
|