NetBSD Problem Report #40490

From www@NetBSD.org  Mon Jan 26 23:40:43 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id CD3BF63BFFA
	for <gnats-bugs@gnats.netbsd.org>; Mon, 26 Jan 2009 23:40:43 +0000 (UTC)
Message-Id: <20090126234043.9630363B99A@narn.NetBSD.org>
Date: Mon, 26 Jan 2009 23:40:43 +0000 (UTC)
From: ad@netbsd.org
Reply-To: ad@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: 5.0: linux futex cas stuff is a security hole
X-Send-Pr-Version: www-1.0

>Number:         40490
>Category:       kern
>Synopsis:       5.0: linux futex cas stuff is a security hole
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    rmind
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 26 23:45:00 +0000 2009
>Closed-Date:    Mon Feb 23 20:30:45 +0000 2009
>Last-Modified:  Thu Feb 26 20:45:01 +0000 2009
>Originator:     Andrew Doran
>Release:        5.0_BETA
>Organization:
ad@netbsd.org
>Environment:
n/a
>Description:
The CAS stuff added for linux futexes is a security hole that could
either leak memory cross process or crash the kernel.

>How-To-Repeat:
Code inspection.

>Fix:
Add ucasptr() and move to copy.S, build linux ops on it.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->ad
Responsible-Changed-By: ad@NetBSD.org
Responsible-Changed-When: Mon, 26 Jan 2009 23:50:02 +0000
Responsible-Changed-Why:
take, needs to go in for 5.0


Responsible-Changed-From-To: ad->rmind
Responsible-Changed-By: rmind@NetBSD.org
Responsible-Changed-When: Sun, 22 Feb 2009 19:19:45 +0000
Responsible-Changed-Why:
I have the fix.


From: Mindaugas Rasiukevicius <rmind@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40490 CVS commit: src/sys/compat/linux
Date: Mon, 23 Feb 2009 20:28:58 +0000 (UTC)

 Module Name:	src
 Committed By:	rmind
 Date:		Mon Feb 23 20:28:58 UTC 2009

 Modified Files:
 	src/sys/compat/linux/arch/amd64: files.linux_amd64
 	src/sys/compat/linux/arch/i386: files.linux_i386
 	src/sys/compat/linux/common: linux_futex.c
 Removed Files:
 	src/sys/compat/linux/arch/amd64: linux_support.S
 	src/sys/compat/linux/arch/i386: linux_support.S

 Log Message:
 Switch Linux futex emulation to native ucas_int(), remove unecessary
 futex-specific assembler routines.

 Fixes PR/40490.  Reviewed by <ad>.


 To generate a diff of this commit:
 cvs rdiff -r1.3 -r1.4 src/sys/compat/linux/arch/amd64/files.linux_amd64
 cvs rdiff -r1.2 -r0 src/sys/compat/linux/arch/amd64/linux_support.S
 cvs rdiff -r1.9 -r1.10 src/sys/compat/linux/arch/i386/files.linux_i386
 cvs rdiff -r1.4 -r0 src/sys/compat/linux/arch/i386/linux_support.S
 cvs rdiff -r1.22 -r1.23 src/sys/compat/linux/common/linux_futex.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: rmind@NetBSD.org
State-Changed-When: Mon, 23 Feb 2009 20:30:45 +0000
State-Changed-Why:
Fixed.


From: Andrew Doran <ad@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/40490 (5.0: linux futex cas stuff is a security hole)
Date: Mon, 23 Feb 2009 20:41:37 +0000

 On Mon, Feb 23, 2009 at 08:30:46PM +0000, rmind@NetBSD.org wrote:
 > Synopsis: 5.0: linux futex cas stuff is a security hole
 > 
 > State-Changed-From-To: open->closed
 > State-Changed-By: rmind@NetBSD.org
 > State-Changed-When: Mon, 23 Feb 2009 20:30:45 +0000
 > State-Changed-Why:
 > Fixed.

 Nicely done, thank you!

 Andrew

From: jnemeth@victoria.tc.ca (John Nemeth)
To: gnats-bugs@NetBSD.org, rmind@NetBSD.org, netbsd-bugs@NetBSD.org,
        ad@NetBSD.org
Cc: 
Subject: Re: kern/40490 (5.0: linux futex cas stuff is a security hole)
Date: Mon, 23 Feb 2009 13:01:51 -0800

 On Jun 10,  8:38am, rmind@NetBSD.org wrote:

 } Synopsis: 5.0: linux futex cas stuff is a security hole
 } 
 } State-Changed-From-To: open->closed
 } State-Changed-By: rmind@NetBSD.org
 } State-Changed-When: Mon, 23 Feb 2009 20:30:45 +0000
 } State-Changed-Why:
 } Fixed.

      Given that the synopsis says "5.0" doesn't this require a pullup?
 If so, then it isn't fixed yet.

 }-- End of excerpt from rmind@NetBSD.org

From: Soren Jacobsen <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40490 CVS commit: [netbsd-5] src/sys/compat/linux
Date: Thu, 26 Feb 2009 20:40:52 +0000 (UTC)

 Module Name:	src
 Committed By:	snj
 Date:		Thu Feb 26 20:40:52 UTC 2009

 Modified Files:
 	src/sys/compat/linux/arch/amd64 [netbsd-5]: files.linux_amd64
 	src/sys/compat/linux/arch/i386 [netbsd-5]: files.linux_i386
 	src/sys/compat/linux/common [netbsd-5]: linux_futex.c
 Removed Files:
 	src/sys/compat/linux/arch/amd64 [netbsd-5]: linux_support.S
 	src/sys/compat/linux/arch/i386 [netbsd-5]: linux_support.S

 Log Message:
 Pull up following revision(s) (requested by rmind in ticket #493):
 	sys/compat/linux/arch/amd64/files.linux_amd64: revision 1.4
 	sys/compat/linux/arch/amd64/linux_support.S: file removal
 	sys/compat/linux/common/linux_futex.c: revision 1.23
 	sys/compat/linux/arch/i386/linux_support.S: file removal
 	sys/compat/linux/arch/i386/files.linux_i386: revision 1.10
 Switch Linux futex emulation to native ucas_int(), remove unecessary
 futex-specific assembler routines.
 Fixes PR/40490.  Reviewed by <ad>.


 To generate a diff of this commit:
 cvs rdiff -r1.3 -r1.3.4.1 src/sys/compat/linux/arch/amd64/files.linux_amd64
 cvs rdiff -r1.1 -r0 src/sys/compat/linux/arch/amd64/linux_support.S
 cvs rdiff -r1.9 -r1.9.4.1 src/sys/compat/linux/arch/i386/files.linux_i386
 cvs rdiff -r1.3 -r0 src/sys/compat/linux/arch/i386/linux_support.S
 cvs rdiff -r1.18 -r1.18.4.1 src/sys/compat/linux/common/linux_futex.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.