Date: Mon, 8 Jul 2002 23:42:44 -0700 (PDT) From: Sarnath <sparc64@rediffmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/40369: rman_reserve_resource - when "count > (end-start+1)"- doesn't trap it. Message-ID: <200207090642.g696gi12059702@www.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 40369 >Category: kern >Synopsis: rman_reserve_resource - when "count > (end-start+1)"- doesn't trap it. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 08 23:50:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Sarnath >Release: 4.5-RELEASE >Organization: --NA-- >Environment: FreeBSD Venus.na.com 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Wed Jun 5 15:56:23 IST 2002 yuhu@Venus.na.com:/usr/obj/usr/src/sys/GENERIC i386 >Description: rman_reserve_resource allocates resources even if (count > (end-start+1)). The sanity of the parameters are unchecked. This might bomb the kernel when a BUS driver behaves wrongly. >How-To-Repeat: Call rman_reserve_resource with count ? (end-start+1) >Fix: 1) One can add explictit sanity check for this. OR 2) File: /usr/src/sys/kern/subr_rman.c, Line num: 232. Original: rend = min(s->r_end, max(start + count, end)); Change as: rend = min(s->r_end, min(start + count, end)); >Release-Note: >Audit-Trail: >Unformatted: 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?200207090642.g696gi12059702>