From owner-freebsd-current@freebsd.org Wed Jun 7 17:22:40 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 696F6C79BD4 for ; Wed, 7 Jun 2017 17:22:40 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms-10.1blu.de (ms-10.1blu.de [178.254.4.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D3017B7EB for ; Wed, 7 Jun 2017 17:22:39 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from [88.217.110.0] (helo=localhost.unixarea.de) by ms-10.1blu.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.86_2) (envelope-from ) id 1dIefE-0001jT-5X; Wed, 07 Jun 2017 19:22:36 +0200 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.unixarea.de (8.15.2/8.14.9) with ESMTPS id v57HMZ6G004028 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 7 Jun 2017 19:22:35 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.15.2/8.14.9/Submit) id v57HMYt3004027; Wed, 7 Jun 2017 19:22:34 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Wed, 7 Jun 2017 19:22:34 +0200 From: Matthias Apitz To: freebsd-current@freebsd.org Cc: Matthias Apitz Subject: Re: mount_smbfs gives error when stored crypted pw is used Message-ID: <20170607172234.GA3972@c720-r314251> Reply-To: Matthias Apitz Mail-Followup-To: Matthias Apitz , freebsd-current@freebsd.org References: <20170606100034.GA4245@c720-r314251> <20170606123738.GA5213@c720-r314251> <20170607123531.GA4867@c720-r314251> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Nq2Wo0NMKNjxTN9z" Content-Disposition: inline In-Reply-To: <20170607123531.GA4867@c720-r314251> X-Operating-System: FreeBSD 12.0-CURRENT r314251 (amd64) User-Agent: Mutt/1.8.0 (2017-02-23) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 88.217.110.0 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jun 2017 17:22:40 -0000 --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable El d=C3=ADa mi=C3=A9rcoles, junio 07, 2017 a las 02:35:31p. m. +0200, Matth= ias Apitz escribi=C3=B3: > I have located the bug in /usr/src/contrib/smbfs/lib/smb/subr.c=20 >=20 > The printf(3C) calls have been added for debugging; the bug is the > addition of 13 after crypting every char which let the mask used in ^ ope= ration > exceeding 256, i.e. more than one byte, if the string to be crypted is lo= ng > enough. The two lines added: >=20 > if (pos > 256) > pos =3D pos-256; >=20 > fixes this issue and the crypting/decypting works fine; see below; >=20 > I'll later file a PR and propose the patch; The PR was already made in 2009: https://bugs.freebsd.org/bugzilla/show_bug= =2Ecgi?id=3D132302 has a patch attached (nearly the same solution as I have found), but was never ci'ed :-( matthias --=20 Matthias Apitz, =E2=9C=89 guru@unixarea.de, =E2=8C=82 http://www.unixarea.d= e/ =E2=98=8E +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub 8. Mai 1945: Wer nicht feiert hat den Krieg verloren. 8 de mayo de 1945: Quien no festeja perdi=C3=B3 la Guerra. May 8, 1945: Who does not celebrate lost the War. --Nq2Wo0NMKNjxTN9z Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEXmn7rBYYViyzy/vBR8z35Hb+nREFAlk4NlMACgkQR8z35Hb+ nRFPEg/8D/jNZ+Qcxy8wM3j06IziChQ4UenjiQfEKewNpZig0sJXTI2ClmpKkFpR N23trcVAe5OieLfbIwtaqmogJLX8cdbi5zt1Hn7vi03W+ArlhNzvJporOugcfavC upeAHVBYPft+UftbzIih7xqPR56D9YMTUSK7LE72b2JDg3vmbeId+N1rFbKEfOdl wz7jwV5oMR2fdf4todmR6xVolHH+mPlbBLcCEapspVVk2pMgcQCwocnJyfhXxEs1 OccGcpeGsNfk5N/Pl1QrbSyypYm8xmx2WBtmixNqI0rSu0VVrDpfKNTZRzL+mUy/ 6I7w2fpzYC5vNdB0h+TkCJ6dpsq3Dlmibw2fcF1X+AikL9ijXQb54yQYV/a9i3qR FvwS7O0EepZCpLj7M/OFOslKO06Ig6dznBW+p1klbfVi+jYZqQ3oMearhiR8Sw+9 m4VWa583SOn+XZGLta798Ss+uGjlHiLBI6xG88psl0domiSf7/HRQcl3mZwTLD5B NJ/8xg6ncgwGEG2h1ZmytgIgI49MRRr/HI5LgVAkgymCyFCB0qCrIf+Fkhdv9l1E SEb0z1eKulMjFeAkFo9Uq4tZkiUkhofsBm0QFVHIXLi1Xg7VUUhEdzMwXvZf2U73 13yei3tFhwbN8wYNjnNzg+Y6J1SHOBIk6niZCPBnEXTu9SpJEak= =/1/P -----END PGP SIGNATURE----- --Nq2Wo0NMKNjxTN9z--