From nobody@FreeBSD.org  Wed Sep 26 18:30:06 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id B9F5E37B42F
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 26 Sep 2001 18:30:05 -0700 (PDT)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id f8R1U5L86525;
	Wed, 26 Sep 2001 18:30:05 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200109270130.f8R1U5L86525@freefall.freebsd.org>
Date: Wed, 26 Sep 2001 18:30:05 -0700 (PDT)
From: David Xu <davidx@viasoft.com.cn>
To: freebsd-gnats-submit@FreeBSD.org
Subject: intr_machdep.c allows access out of array bound
X-Send-Pr-Version: www-1.0

>Number:         30857
>Category:       kern
>Synopsis:       [intr] [patch] intr_machdep.c allows access out of array bound
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 26 18:40:00 PDT 2001
>Closed-Date:    Sun Jun 10 06:18:25 GMT 2007
>Last-Modified:  Sun Jun 10 06:18:25 GMT 2007
>Originator:     David Xu
>Release:        FreeBSD 4.4-release
>Organization:
Viasoft
>Environment:
FreeBSD davidbsd.viasoft.com.cn 4.4-RELEASE FreeBSD 4.4-RELEASE #3: Thu Sep 27 0
9:04:24 CST 2001     root@davidbsd.viasoft.com.cn:/usr/src/sys/compile/xu  i386
>Description:
in source file /sys/i386/isa/intr_machdep.c, function icu_setup
does not detect array bound correctly, allow access out of bound data.
>How-To-Repeat:

>Fix:
patch is here:
--- intr_machdep.c.orig	Thu Sep 27 09:03:29 2001
+++ intr_machdep.c	Thu Sep 27 09:04:11 2001
@@ -433,6 +433,7 @@
 #else
 	if ((u_int)intr >= ICU_LEN || intr == ICU_SLAVEID)
 #endif /* APIC_IO */
+		return (EINVAL);
 	if (intr_handler[intr] != isa_strayintr)
 		return (EBUSY);
>Release-Note:
>Audit-Trail:

From: Bruce Evans <bde@zeta.org.au>
To: David Xu <davidx@viasoft.com.cn>
Cc: <freebsd-gnats-submit@FreeBSD.ORG>
Subject: Re: misc/30857: intr_machdep.c allows access out of array bound
Date: Thu, 27 Sep 2001 15:55:24 +1000 (EST)

 On Wed, 26 Sep 2001, David Xu wrote:
 
 > >Description:
 > in source file /sys/i386/isa/intr_machdep.c, function icu_setup
 > does not detect array bound correctly, allow access out of bound data.
 > >How-To-Repeat:
 >
 > >Fix:
 > patch is here:
 > --- intr_machdep.c.orig	Thu Sep 27 09:03:29 2001
 > +++ intr_machdep.c	Thu Sep 27 09:04:11 2001
 > @@ -433,6 +433,7 @@
 >  #else
 >  	if ((u_int)intr >= ICU_LEN || intr == ICU_SLAVEID)
 >  #endif /* APIC_IO */
 > +		return (EINVAL);
 
 These bytes rotted away when register_intr() was mutated to icu_setup() in
 rev.1.85 if sys/i386/isa/isa.c.
 
 >  	if (intr_handler[intr] != isa_strayintr)
 >  		return (EBUSY);
 
 Bruce
 
State-Changed-From-To: open->closed 
State-Changed-By: cperciva 
State-Changed-When: Tue Feb 17 09:48:51 PST 2004 
State-Changed-Why:  
Fixed by jlemon by Sept 2001. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=30857 
State-Changed-From-To: closed->patched 
State-Changed-By: cperciva 
State-Changed-When: Tue Feb 17 19:39:53 PST 2004 
State-Changed-Why:  
Sorry, I wasn't paying attention.  This still needs to be 
fixed in RELENG_4. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=30857 
State-Changed-From-To: patched->closed 
State-Changed-By: linimon 
State-Changed-When: Sun Jun 10 06:17:21 UTC 2007 
State-Changed-Why:  
RELENG_4 is now out of support, so this PR is obsolete. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=30857 
>Unformatted:
