NetBSD Problem Report #25676

Received: (qmail 13594 invoked by uid 605); 22 May 2004 21:44:59 -0000
Message-Id: <Pine.BSF.4.51.0405221733570.64870@vegeta.city-net.com>
Date: Sat, 22 May 2004 17:42:17 -0400 (EDT)
From: Matthew Orgass <darkstar@city-net.com>
Sender: gnats-bugs-owner@NetBSD.org
To: gnats-bugs@gnats.netbsd.org
Subject: Incorrect buffer usage in umass CBI transfers

>Number:         25676
>Category:       kern
>Synopsis:       Incorrect buffer usage in umass CBI transfers
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    mycroft
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 22 21:45:00 +0000 2004
>Closed-Date:    Fri Jun 25 14:14:49 +0000 2004
>Last-Modified:  Fri Jul 02 17:21:00 +0000 2004
>Originator:     darkstar@city-net.com
>Release:        NetBSD 1.6ZK
>Organization:
>Environment:
>Description:
>How-To-Repeat:
>Fix:

Index: umass.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/umass.c,v
retrieving revision 1.109
diff -u -r1.109 umass.c
--- umass.c	4 Dec 2003 13:57:31 -0000	1.109
+++ umass.c	22 May 2004 21:18:15 -0000
@@ -1489,7 +1489,7 @@
 		sc->transfer_state = TSTATE_CBI_DATA;
 		if (sc->transfer_dir == DIR_IN) {
 			if (umass_setup_transfer(sc, sc->sc_pipe[UMASS_BULKIN],
-					sc->transfer_data, sc->transfer_datalen,
+					sc->data_buffer, sc->transfer_datalen,
 					USBD_SHORT_XFER_OK | USBD_NO_COPY,
 					sc->transfer_xfer[XFER_CBI_DATA]))
 				umass_cbi_reset(sc, STATUS_WIRE_FAILED);
@@ -1499,7 +1499,7 @@
 			memcpy(sc->data_buffer, sc->transfer_data,
 			       sc->transfer_datalen);
 			if (umass_setup_transfer(sc, sc->sc_pipe[UMASS_BULKOUT],
-					sc->transfer_data, sc->transfer_datalen,
+					sc->data_buffer, sc->transfer_datalen,
 					USBD_NO_COPY,/* fixed length transfer */
 					sc->transfer_xfer[XFER_CBI_DATA]))
 				umass_cbi_reset(sc, STATUS_WIRE_FAILED);


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mycroft 
State-Changed-When: Fri Jun 25 14:09:48 UTC 2004 
State-Changed-Why:  
Patch applied. 
Responsible-Changed-From-To: kern-bug-people->mycroft 
Responsible-Changed-By: mycroft 
Responsible-Changed-When: Fri Jun 25 14:14:56 UTC 2004 
Responsible-Changed-Why:  
. 

From: "Charles M. Hannum" <mycroft@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/25676 CVS commit: src/sys/dev/usb
Date: Fri, 25 Jun 2004 14:14:34 +0000 (UTC)

 Module Name:	src
 Committed By:	mycroft
 Date:		Fri Jun 25 14:14:34 UTC 2004

 Modified Files:
 	src/sys/dev/usb: umass.c

 Log Message:
 Fix usage of incorrect buffer in CBI, possibly causing general failure to
 transfer data correctly.  See PR 25676.


 To generate a diff of this commit:
 cvs rdiff -r1.113 -r1.114 src/sys/dev/usb/umass.c

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


From: Havard Eidnes <he@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/25676 CVS commit: [netbsd-2-0] src/sys/dev/usb
Date: Fri,  2 Jul 2004 17:19:53 +0000 (UTC)

 Module Name:	src
 Committed By:	he
 Date:		Fri Jul  2 17:19:52 UTC 2004

 Modified Files:
 	src/sys/dev/usb [netbsd-2-0]: umass.c

 Log Message:
 Pull up revisions 1.113-1.115 (requested by mycroft in ticket #572):
   Several fixes mostly related to USB:
    o Use STATUS_CMD_FAILED instead of STATUS_WIRE_FAILED in
      response to a CBI stall, so that we do a REQUEST SENSE
      thereafter.  Fixes PR#22960.
    o Fix usage of incorrect buffer in CBI, possibly causing
      general failure to transfer data correctly.  Fixes
      PR#25676.
    o Do not do a CBI resset before returning STATUS_CMD_FAILED.
      This causes any sense information to be thrown away.


 To generate a diff of this commit:
 cvs rdiff -r1.109 -r1.109.2.1 src/sys/dev/usb/umass.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.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.