Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 May 1999 07:25:49 -0700 (PDT)
From:      amobbs@allstor-sw.co.uk
To:        freebsd-gnats-submit@freebsd.org
Subject:   kern/11870: Memory access permission checks wrong way around in sys/cam/cam_periph.c
Message-ID:  <19990524142549.7360A14BD3@hub.freebsd.org>

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

>Number:         11870
>Category:       kern
>Synopsis:       Memory access permission checks wrong way around in sys/cam/cam_periph.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 24 07:30:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Andrew Mobbs
>Release:        FreeBSD-3.0-RELEASE
>Organization:
Allstor Software Ltd.
>Environment:
FreeBSD symbiosis.software.plasmon 3.0-RELEASE FreeBSD 3.0-RELEASE #3: Mon Apr 19 17:31:43 BST 1999     andrew@symbiosis.software.plasmon:/usr/src/sys/compile/990322_symbiosis  i386

(N.B. The patch is against FreeBSD-stable)

>Description:
cam_periph_mapmem tests to see if the user-land buffer can be 
read or written depending on whether the dataflow is CAM_DIR_OUT 
or CAM_DIR_IN. Unfortunatly these checks are the wrong way around,
causing the operation to fail unnecessarily, unless the buffer is R/W.

>How-To-Repeat:
Try using a read-only mmap'd file with a SCSI passthrough driver write
operation.

>Fix:
begin 664 -
M+2TM(&-A;5]P97)I<&@N8RYO<FEG"4UO;B!-87D@,C0@,34Z,C,Z,S@@,3DY
M.0HK*RL@8V%M7W!E<FEP:"YC"4UO;B!-87D@,C0@,34Z,C0Z,S8@,3DY.0I`
M0"`M-34X+#<@*S4U."PW($!`"B`)"0ER971U<FXH13)"24<I.PH@"0E]"B`*
M+0D):68@*&1I<G-;:5T@)B!#04U?1$E27TE.*2!["BL)"6EF("AD:7)S6VE=
M("8@0T%-7T1)4E]/550I('L*(`D)"69L86=S6VE=(#T@0E]214%$.PH@"0D)
M:68@*'5S97)A8V,H*F1A=&%?<'1R<UMI72P@;&5N9W1H<UMI72P@0E]214%$
M*2`]/2`P*7L*(`D)"0EP<FEN=&8H(F-A;5]P97)I<&A?;6%P;65M.B!E<G)O
M<BP@(@I`0"`M-3<T+#<@*S4W-"PW($!`"B`)"2`J(%A86"!T:&ES(&-H96-K
M(&ES(')E86QL>2!B;V=U<RP@<VEN8V4@0E]74DE412!C=7)R96YT;'D*(`D)
M("H@:7,@86QL(#`G<RP@86YD('-O(&ET(&ES(")S970B(&%L;"!T:&4@=&EM
M92X*(`D)("HO"BT)"6EF("AD:7)S6VE=("8@0T%-7T1)4E]/550I('L**PD)
M:68@*&1I<G-;:5T@)B!#04U?1$E27TE.*2!["B`)"0EF;&%G<UMI72!\/2!"
M7U=2251%.PH@"0D):68@*'5S97)A8V,H*F1A=&%?<'1R<UMI72P@;&5N9W1H
M<UMI72P@0E]74DE412D@/3T@,"E["B`)"0D)<')I;G1F*")C86U?<&5R:7!H
27VUA<&UE;3H@97)R;W(L("(*
`
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?19990524142549.7360A14BD3>