|Summary:||Linux < 2.6.25-rc5 gcc-4.3 missing DF clear memory corruption (CVE-2008-1367)|
|Product:||Gentoo Security||Reporter:||Robert Buchholz (RETIRED) <rbu>|
|Component:||Kernel||Assignee:||Gentoo Security <security>|
|Severity:||minor||CC:||gengor, hoffie, kernel, kfm, ziga.boehm|
|Whiteboard:||[linux < 2.6.25_rc5]|
|Package list:||Runtime testing required:||---|
Description Robert Buchholz (RETIRED) 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  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  and committed  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.  http://thread.gmane.org/gmane.linux.kernel/650180  http://lwn.net/Articles/272203/  http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e40cd10ccff3d9fbffd57b93780bee4b7b9bff51
Comment 1 Mike Pagano 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) 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 2008-04-24 13:35:56 UTC
This commit has been backported to the 2.6.24 stable tree and is included in 184.108.40.206 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-220.127.116.11 This patch will be in the next release of gentoo-sources.