Re: Buffer overflow in name_to_tcb

Lasse Kliemann <[email protected]> Sun, 4 Sep 2011 20:05:21 +0200
Newsgroups gmane.comp.archivers.star.user
Message-ID <[email protected]>
--===============3403176282960773436==
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="7JfCtLOvnd9MIVvH"
Content-Disposition: inline


--7JfCtLOvnd9MIVvH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Message by -Lasse Kliemann- from Wed 2011-07-06:
> * Message by -Joerg Schilling- from Wed 2011-06-15:
>=20
> > > > There is a trick to make over-picky compilers quiet......
> > > >=20
> > > > change strcpy(ptb->dbuf.t_name, name); to:
> > > >=20
> > > > 	strcpy(ptb->ndbuf.t_name, name);
> > > >=20
> > > > and try again.....
> > >
> > > This works.
> > >
> > > Is it intended as a permanent fix?
> >=20
> > This is seen as a workaround as an intentionally wrong data structure v=
ariant=20
> > cannot be seen as a fix.
>=20
> I see the workaround has been incorporated into 2011-06-22.
>=20
> I have compiled that version with my usual CFLAGS including
>=20
>   -fstack-protector-all -D_FORTIFY_SOURCE=3D2
>=20
> There were no more problems, although I pushed a dozen TB through=20
> star the last days.

I ran into another problem today. A filename of length 100 inside=20
a directory triggers the bound check, when invoked like so:

star -c d/01234567890123456789012345678901234567890123456789012345678901234=
56789012345678901234567890123456789

I tracked it down to line 201 in longnames.c. Probably line 199=20
is an issue too. Could the same workaround be applied here? I=20
tried that, and it seems to work, but I am not sure.

--7JfCtLOvnd9MIVvH
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAgAGBQJOY73hAAoJEFYll6N4nhdvmLsP/0ygDKb/vPLN/yWg8SUhKv+2
5JIbluEzXOM+AOnbdFyqz28MZXgQSwqTJKDaDS8EGs8UoBJvIyLoo4J4PiiWxJzg
95ZJfSHzZoYvo4hNyhidJ8T3zlArHBmMao27wzFFvLp9Ffa/XYXAg5HLdkWWw++5
Zkw0EbslIZASBUT9lx83Ip4RmsajycXv0pta+nAnc5m7UJYgYcin59RKxQ/DZVb5
ckN38OLXBNas9bHdL8BhJLQtFnVHt8+sMHOq5F1mCJSfWU6tCkp5ape5Zz0J2stA
41b9UTft2JW6/7vIRkSoRrXwtUsRRl9V/J9rEYQUt6FmPlnEo2wnZuzuEbSlWxZj
wT8cQ7GFUGJxgW/qI6kk8x9HgHxYY1eVQMJHIDYHG0fkT/v5Fccwmz1LhzCgD2m8
7MDszfSsXfVzPZHL+J75sptsopG2cWXcxlpBs22+vjqquDIPJGeSjZyyWcY8VGag
9aLGBYuIPKncr8LO1ctaBuYJqvFgUoLPnVUOH4NhunnQMUpVkUYm6YzGnWY7iHX/
pNALpPVkDewxU1OoRM4m4dtXLwEA1GYFgS/mIXWJAoD6gEz6kC/01XLSg8QiTflG
MGapFY3UycW2NhGK8cbhC3E8OujR8bkrqTrJoxjvqxeFZCY+WOHGGAYnXdi/m9ts
OaA0dnSR6//Nd98w+k+d
=MuwZ
-----END PGP SIGNATURE-----

--7JfCtLOvnd9MIVvH--

--===============3403176282960773436==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Star-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/star-users

--===============3403176282960773436==--