Bug 90499 (CVE-2005-1768)

Summary: VUL-0: CVE-2005-1768: kernel: buffer overflow in 32bit execve compat function
Product: [Novell Products] SUSE Security Incidents Reporter: Andreas Kleen <ak>
Component: IncidentsAssignee: Security Team bot <security-team>
Status: RESOLVED FIXED QA Contact: Security Team bot <security-team>
Severity: Critical    
Priority: P2 - High CC: gp, security-team, stefan.fent
Version: unspecified   
Target Milestone: ---   
Hardware: 64bit   
OS: All   
Whiteboard: CVE-2005-1768: CVSS v2 Base Score: 3.7 (AV:L/AC:H/Au:N/C:P/I:P/A:P)
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Untested patch for 2.4 for ia64 and x86-64
Updated patch that handles corner case too
tested and working patch (on x86-64)
2.4 patch for x86-64/ia64
New 2.4 patch

Comment 1 Andreas Kleen 2005-06-12 13:40:18 UTC
Created attachment 39007 [details]
Untested patch for 2.4 for ia64 and x86-64

Should easily apply to older 2.6 kernels like SLES too
Comment 2 Andreas Kleen 2005-06-12 14:55:38 UTC
Created attachment 39009 [details]
Updated patch that handles corner case too

Use this one instead of the previous one. Still
untested :/
Comment 3 Ludwig Nussel 2005-06-13 08:07:02 UTC
CAN-2005-1768  
Comment 4 Hubert Mantel 2005-06-13 10:10:16 UTC
Is this already public?
Comment 5 Andreas Kleen 2005-06-13 10:31:58 UTC
No, it's not. And it needs delay because it is serious.
Comment 6 Ludwig Nussel 2005-06-14 06:59:07 UTC
Do we have the ia32 subsystem disabled on ia64? 
 
Date: Mon, 13 Jun 2005 10:10:16 -0700                                                                                    
From: David Mosberger <davidm@napali.hpl.hp.com>                                                                         
Subject: [security@suse.de] Re: race condition in ia64 and x86-64 kernel code                                            
 
Hi Ilia, 
 
Thanks for the bug-report.  I'll cc Arun Sharma, since he's the 
maintainer of the ia32 subsystem for ia64.  I don't believe the bug is 
critical for recent versions of Red Hat and SuSE, since they 
exlusively use ia32el (user-level ia32 support via binary translation) 
with the kernel's ia32 subsystem disabled.  Still, the bug obviously 
needs to be fixed. 
 
Thanks, 
 
        --david 
Comment 7 Andreas Kleen 2005-06-14 09:16:52 UTC
Not unconditionally, it is a sysconfig. AFAIK it is enabled by default in 
older releases.
Comment 8 Ludwig Nussel 2005-06-16 10:03:05 UTC
Proposed CRD is Monday, 20.06. 18:00 CEST 
Comment 9 Gerald Pfeifer 2005-06-20 08:36:21 UTC
So, do we have a fix we can put into RC3 (kernel submission 21.6. afternoon)
and thus close this blocker?
Comment 10 Marcus Meissner 2005-06-20 08:46:16 UTC
andi should be able to say... 
Comment 11 Andreas Kleen 2005-06-20 12:09:14 UTC
Hmm, someone needs to test the fix first, I didnt :/
Comment 12 Marcus Meissner 2005-06-21 15:29:45 UTC
I have asked Bodo to name someone to test this and he named Philipp Thomas. 
Comment 13 Philipp Thomas 2005-06-21 15:40:50 UTC
How do I test it? Does any exploiting code exist? 
Comment 14 Marcus Meissner 2005-06-21 15:47:16 UTC
try running 32bit executables with arguments... those should be used 
correctly and work ;) 
 
try running 32bit executable in the background and look if "ps auxw" shows 
it correctly. 
Comment 15 Philipp Thomas 2005-06-21 16:55:35 UTC
The patch doesn't apply to the SLES9 SP2 kernel. Part of the problems are only
whitespace so I can fix them myself, but the nargs in ia64 is:

static int
nargs (unsigned int arg, char **ap, int max)
{
        unsigned int addr;
        int n, err;

        if (!arg)
                return 0;

        n = 0;
        do {
                err = get_user(addr, (unsigned int *)A(arg));
                if (err)
                        return err;
                if (ap)
                        *ap++ = (char *) A(addr);
                arg += sizeof(unsigned int);
                n++;
        } while (addr);
        return n - 1;
}

How to proceed?
Comment 16 Marcus Meissner 2005-06-22 14:51:20 UTC
i am preparing a working 2.6 patch  
Comment 17 Andreas Kleen 2005-06-22 14:52:37 UTC
I already have one, just testing.
Comment 18 Andreas Kleen 2005-06-22 15:20:05 UTC
Created attachment 39665 [details]
tested and working patch (on x86-64)
Comment 19 Marcus Meissner 2005-06-22 15:22:02 UTC
philipp, can you please try this patch? 
Comment 20 Andreas Kleen 2005-06-22 15:23:40 UTC
I tested it on x86-64, but a quick test on ia64 would be good.
Comment 21 Gerald Pfeifer 2005-06-24 12:00:42 UTC
Can we get some traction here, please?  This is a blocker, yet no
activity for two days!  Stefan, Philipp?
Comment 22 Andreas Kleen 2005-06-24 12:55:01 UTC
It just needs a quick test on ia64
Comment 23 Andreas Schwab 2005-06-24 13:06:38 UTC
Working on it. 
Comment 24 Philipp Thomas 2005-06-24 13:14:57 UTC
Kernel is built, waiting for setup to be finished. I guess we'll have a result
in approx. 30 minutes.
Comment 25 Philipp Thomas 2005-06-24 13:49:26 UTC
Just tested with firefox on ia64 and the patch seems to work as it should.
Comment 26 Gerald Pfeifer 2005-06-24 13:52:33 UTC
But there is no reference to this Bugzilla in the SP2 kernel CVS!
Comment 27 Andreas Kleen 2005-06-24 14:32:42 UTC
I checked the patch in.
Comment 28 Marcus Meissner 2005-06-27 06:47:59 UTC
still need to fix it for all other kernels. 
Comment 29 Andreas Kleen 2005-06-27 06:52:17 UTC
Created attachment 39949 [details]
2.4 patch for x86-64/ia64

Only lightly tested again.
Comment 30 Marcus Meissner 2005-06-27 09:34:27 UTC
hubert, please apply to all necessary branches. 
Comment 31 Andreas Kleen 2005-06-28 06:38:25 UTC
Created attachment 40061 [details]
New 2.4 patch

I tested the 2.4 patch on x86-64 now and it was
indeed broken. Fixed version.
Comment 32 Marcus Meissner 2005-06-29 09:33:28 UTC
hubert, can you apply the 2.4 patch to the SLES 8 kernel repo please? 
Comment 33 Marcus Meissner 2005-06-30 13:38:10 UTC
not in sp2 ... needs to be pushed out with next kernelupdate. 
Comment 34 Hubert Mantel 2005-07-19 08:52:57 UTC
Fix is in all affected trees.
Comment 35 Marcus Meissner 2005-07-22 08:16:55 UTC
swampid: 1864 
Comment 36 Ludwig Nussel 2005-08-04 07:10:31 UTC
updates released  
Comment 37 Thomas Biege 2009-10-13 21:27:47 UTC
CVE-2005-1768: CVSS v2 Base Score: 3.7 (AV:L/AC:H/Au:N/C:P/I:P/A:P)