+++ 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
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?
(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.
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.