Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jun 2002 14:10:03 -0700 (PDT)
From:      elias@kjell.utb.falun.se (elias)
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/39960: wi driver can cause system crash when trying to handle negative value for WI_RID_TX_CRYPT_KEY
Message-ID:  <200206282110.g5SLA3XS019563@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

The following reply was made to PR kern/39960; it has been noted by GNATS.

From: elias@kjell.utb.falun.se (elias)
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/39960: wi driver can cause system crash when trying to handle negative value for WI_RID_TX_CRYPT_KEY
Date: Fri, 28 Jun 2002 23:01:18 +0200 (CEST)

 Here's the patch. (somehow it was left out of the original post)
 
 ----cut------------
 *** if_wi.c.old Fri Jun 28 15:42:24 2002
 --- if_wi.c     Fri Jun 28 15:45:20 2002
 ***************
 *** 1151,1156 ****
 --- 1151,1159 ----
                         ltv = &p2ltv;
                         break;
                 case WI_RID_TX_CRYPT_KEY:
 +                       /* negative can values result in kernel crash */
 +                       if( ltv->wi_val < 0 )
 +                               return 0;
                         p2ltv.wi_type = WI_RID_P2_TX_CRYPT_KEY;
                         p2ltv.wi_len = 2;
                         p2ltv.wi_val = ltv->wi_val;
 ----cut------------

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206282110.g5SLA3XS019563>