Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 213811 (CVE-2008-1367) - Linux < 2.6.25-rc5 gcc-4.3 missing DF clear memory corruption (CVE-2008-1367)
Summary: Linux < 2.6.25-rc5 gcc-4.3 missing DF clear memory corruption (CVE-2008-1367)
Status: RESOLVED FIXED
Alias: CVE-2008-1367
Product: Gentoo Security
Classification: Unclassified
Component: Kernel (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Security
URL: http://thread.gmane.org/gmane.linux.k...
Whiteboard: [linux < 2.6.25_rc5]
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-18 11:54 UTC by Robert Buchholz (RETIRED)
Modified: 2013-09-05 02:56 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Buchholz (RETIRED) gentoo-dev 2008-03-18 11:54:25 UTC
+++ This bug was initially created as a clone of Bug #213767 +++

CVE-2008-1367 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2008-1367):
  gcc 4.3.x does not generate a cld instruction while compiling functions used
  for string manipulation such as memcpy and memmove on x86 and i386, which can
  prevent the direction flag (DF) from being reset in violation of ABI
  conventions and cause data to be copied in the wrong direction during signal
  handling in the Linux kernel, which might allow context-dependent attackers
  to trigger memory corruption. NOTE: this issue was originally reported for
  CPU consumption in SBCL.


------- Comment #2 From Christian Hoffmann 2008-03-18 10:44:58 0000 -------

According to a mailing list discussion [1] this is not a gcc bug, but a
behavior change which perfectly matches the specifications. The problem is,
that the Linux kernel (others too) did not match these specs...
A patch to the kernel was already proposed [2] and committed [3] ten days ago,
so now the question is, whether patching gcc is wanted or whether gcc-4.3
should simply require fixed kernels.
CC'ing kernel herd for this reason.


[1] http://thread.gmane.org/gmane.linux.kernel/650180
[2] http://lwn.net/Articles/272203/
[3]
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e40cd10ccff3d9fbffd57b93780bee4b7b9bff51
Comment 1 Mike Pagano gentoo-dev 2008-03-23 18:28:07 UTC
From my understanding of this, gcc 4.2 and 2.6.24 is perfectly fine.  It's gcc 4.3 and < 2.6.25.

And, gcc 4.3 and 2.6.25 is now fixed. Am I correct in saying this? 
Comment 2 Robert Buchholz (RETIRED) gentoo-dev 2008-03-24 01:33:43 UTC
(In reply to comment #1)
> From my understanding of this, gcc 4.2 and 2.6.24 is perfectly fine.  It's gcc
> 4.3 and < 2.6.25.

Yes.
 
> And, gcc 4.3 and 2.6.25 is now fixed. Am I correct in saying this? 

The issue was addressed in the upcoming .25, but the workaround has not been introduced into our GCC.

So we have to make sure the setups we support are safe (i.e. ~arch gcc 4.3 should come with ~arch linux 2.6.25). I'm not sure how far mixing ~arch and arch is supported (i.e. ~arch gcc 4.3 and arch linux <=2.6.24), but if the patch can be pulled down into the next .24 patchset, I'd rather have it in there before gcc 4.3 goes ~arch.


Comment 3 Mike Pagano gentoo-dev 2008-04-24 13:35:56 UTC
This commit has been backported to the 2.6.24 stable tree and is included in 2.6.24.4 which is currently in the gentoo-sources patchset.

Commit:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.24.y.git;a=commitdiff_plain;h=cc7571b226c93b032164ebb3ff3b365651c4652f

ChangeLog:
http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.24.4

This patch will be in the next release of gentoo-sources.