Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 702687 - (CVE-2011-1769) CVE-2011-1769 systemtap: does not guard against DWARF operations div-by-zero errors, which can cause a kernel panic
CVE-2011-1769 systemtap: does not guard against DWARF operations div-by-zero ...
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
public=20110511,reported=20110505,sou...
: Security
Depends On: 703977 703978 703979 703980 840849
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-06 11:19 EDT by Vincent Danen
Modified: 2012-07-17 09:06 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 840849 (view as bug list)
Environment:
Last Closed: 2012-02-03 15:47:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to correct the flaw (3.91 KB, patch)
2011-05-06 11:24 EDT, Vincent Danen
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0841 normal SHIPPED_LIVE Moderate: systemtap security update 2011-05-31 10:31:47 EDT
Red Hat Product Errata RHSA-2011:0842 normal SHIPPED_LIVE Moderate: systemtap security update 2011-05-31 10:04:42 EDT

  None (edit)
Description Vincent Danen 2011-05-06 11:19:24 EDT
A flaw was discovered in systemtap's handling of DWARF expressions where it did not guard against two cases of divide by zero.  This can result in a kernel div-by-zero message and possible busywait during stap module shutdown.  A div-by-zero could cause the kernel to panic and if the kernel reboot on panic flag was set (panic_on_oops), it would cause the system to reboot.

In order to trigger this flaw, it would require a user with staprun or stapdev group membership (or root privileges) to run a particular stap script operation on a hand-corrupted elf program.
Comment 1 Vincent Danen 2011-05-06 11:24:45 EDT
Created attachment 497383 [details]
patch to correct the flaw

This patch corrects both divide by zero issues.
Comment 3 Vincent Danen 2011-05-06 11:59:32 EDT
Also note that the doctored binary must already be running on the system, and that a privileged user would then have to be tricked into inspecting it in a particular way, in order to take advantage of this flaw.
Comment 4 Mark Wielaard 2011-05-06 14:26:02 EDT
Adjusted the title a little to make clear this is a specific case of div-by-zero. Other user input is already checked for such issues.
Comment 5 Vincent Danen 2011-05-06 16:34:50 EDT
Great, thank you for that correction.  The description of the flaw itself is fine?
Comment 6 Frank Ch. Eigler 2011-05-06 17:35:19 EDT
It's probably worth mentioning that the bug exists in processing the 
malevolent DWARF code in two script language constructs: stack unwinding
(backtracing) and $context variable access, for that user-space binary.
Comment 25 Josh Bressers 2011-05-10 13:39:27 EDT
I'm trying to understand this issue.

It seems there are two potential divide by zero conditions. We can group them in one CVE ID, as long as both affect the same versions of systemtap. Does the second testcase not work in RHEL5 becuase the issue isn't there, or some other reason?

Also, for deciding on severity, could a regular user who is able to run sysytemtap write a script capable of crashing the machine? If they can, this is probably a low severity issue since it would then require a malicious user to trick someone into inspecting a binary in a specific way (which is unlikely). However, if non root systemtap users cannot crash a machine, but this lets them, it's slightly more severe (but still only moderate severity since you shouldn't give systemtap access to untrusted users).
Comment 28 Frank Ch. Eigler 2011-05-10 14:33:08 EDT
Mark, the privileges question was not about what an already-root-equivalent
person can do.  root or stapdev can already crash the machine deliberately.
The problem arises from root|stapdev being fooled into operating a particular
way upon a corrupted binary, OR from a stapusr ("unprivileged") user doing so.
Comment 29 Josh Bressers 2011-05-11 15:21:52 EDT
OK, here is where things currently stand.

Due to unprivileged mode, we will rate this flaw as moderate. Without unprivileged mode enabled, this flaw doesn't cross any trust boundary. If an admin has enabled unprivileged mode though, a normal user could use this to crash the target machine.

We will also want to split this to be two CVE ids. The two issues are
stack unwinding (backtracing) and $context variable access.

Let's use CVE-2011-1769 for the $context variable access. This affects versions of systemtap as shipped in Red Hat Enterprise Linux 5 and 6.

The stack unwinding flaw only affects systemtap versions 1.4 and above. It is CVE-2011-1781.
Comment 32 Tomas Hoger 2011-05-20 07:53:27 EDT
Public now via upstream commit mentioned in the previous comment.
Comment 33 errata-xmlrpc 2011-05-31 10:04:48 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2011:0842 https://rhn.redhat.com/errata/RHSA-2011-0842.html
Comment 34 errata-xmlrpc 2011-05-31 10:31:53 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2011:0841 https://rhn.redhat.com/errata/RHSA-2011-0841.html

Note You need to log in before you can comment on or make changes to this bug.