From owner-freebsd-ports@FreeBSD.ORG Sun Mar 11 18:15:44 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 609781065678 for ; Sun, 11 Mar 2012 18:15:44 +0000 (UTC) (envelope-from chalpin+d+1332353238.6ade2a@cs.wisc.edu) Received: from sabe.cs.wisc.edu (sabe.cs.wisc.edu [128.105.6.20]) by mx1.freebsd.org (Postfix) with ESMTP id 2A1848FC0A for ; Sun, 11 Mar 2012 18:15:44 +0000 (UTC) Received: from spiff.home.crhalpin.org (eagleheights-105-18.resnet.wisc.edu [146.151.105.18]) (authenticated bits=0) by sabe.cs.wisc.edu (8.14.1/8.14.1) with ESMTP id q2BI7OxC032592 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 11 Mar 2012 13:07:24 -0500 Received: by spiff.home.crhalpin.org (Postfix, from userid 1001) id F288E1CC37; Sun, 11 Mar 2012 13:07:18 -0500 (CDT) Received: from hobbes.home.crhalpin.org (suzie.home.crhalpin.org [192.168.1.1]) by spiff.home.crhalpin.org (tmda-ofmipd) with ESMTP; Sun, 11 Mar 2012 13:07:11 -0500 Date: Sun, 11 Mar 2012 13:07:11 -0500 To: Carsten =?iso-8859-1?Q?Gn=F6rlich?= Message-ID: <20120311180711.GA2089@hobbes.home.crhalpin.org> References: <4F5CE2B9.7050002@drimsel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0F1p//8PRICkK4MW" Content-Disposition: inline In-Reply-To: <4F5CE2B9.7050002@drimsel.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Corey Halpin X-Primary-Address: chalpin@cs.wisc.edu X-Hashcash: 1:26:120302:freebsd-ports@freebsd.org::HUt5XZzi78w1PvFv:000000000PlKU Cc: "C. P. Ghost" , freebsd-ports@freebsd.org Subject: Re: sysutils/dvdisaster coredumps on FreeBSD/amd64 RELENG_9 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Corey Halpin List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 18:15:44 -0000 --0F1p//8PRICkK4MW Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable That's excellent. Thank you, Carsten. I'll update the FreeBSD port to= =20 include your patch, and will be watching for the new upstream release. CPGhost: thank you for your work to track this down. ~crh On 2012-03-11, Carsten Gn=F6rlich wrote: >Hi C. P. and all, > >> @Carsten: I hope you can pinpoint the problem. I suspect >> a change in FreeBSD's CAM layer API/ABI that causes some >> sort of buffer overrun on RELENG_9. The patch points to the >> exact line of code that causes dvdisaster 0.72.3 to crash. > >Thanks for the report. You're right about the memory >corruption occurring in the line you commented out; >it's a data size mismatch triggered by a size change >in struct scsi_sense_data. > >The attached patch corrects the problem. >A new upstream release will be made after some >more testing. > >Cheers, > Carsten > >--=20 >Carsten Gn=F6rlich * Project homepage http://www.dvdisaster.org >dvdisaster: Additional error correction for CD and DVD media. >GnuPG FP: 12B3 1535 AF90 3ADE 9E73 BA7E 5A59 0EFE F5F6 C46C >--- /dev/shm/dvdisaster-0.72.3/scsi-freebsd.c 2011-10-02 20:32:04.00000000= 0 +0200 >+++ scsi-freebsd.c 2012-03-11 18:19:09.000000000 +0100 >@@ -177,7 +177,6 @@ > Stop("illegal data_mode: %d", data_mode); > } >=20 >- > cam_fill_csio(&ccb->csio, 1, NULL, flags, CAM_TAG_ACTION_NONE,//MSG_SI= MPLE_Q_TAG, > buf, size, sizeof(struct scsi_sense_data), cdb_size,=20 > 120*1000); /* 120 secs timeout */ >@@ -194,7 +193,7 @@ >=20 > /* Extract sense data */ >=20 >- memcpy(sense, &(ccb->csio.sense_data), sizeof(struct scsi_sense_data)); >+ memcpy(sense, &(ccb->csio.sense_data), sizeof(Sense)); >=20 > if((ccb->ccb_h.status & CAM_STATUS_MASK) =3D=3D CAM_REQ_CMP) > return 0; >@@ -204,8 +203,6 @@ > status =3D ccb->csio.scsi_status; >=20 > return -1; >- >- =20 > } >=20 > #endif /* SYS_FREEBSD */ --0F1p//8PRICkK4MW Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iF4EAREIAAYFAk9c6c4ACgkQR8PgTIRJoTXYuQD9HZZyf8hC7eoCQHzH2oU+pXnG m1CZX4jy7Br2aCmtm2cBAIHFhQpGz/jdmQGal04tC9iWgADMHKqPxeNo4NtJnNSH =jPlB -----END PGP SIGNATURE----- --0F1p//8PRICkK4MW--