PDA

Bekijk Volledige Versie : aterm 0.4.2 tty permission weakness



Maarten Tielemans
14/07/04, 05:55
Aterm has an issue with creating a terminal.

A quick ‘ls –al’ on a aterm with ‘mesg y’ shows:
crw--w--w- 1 alsdk users 5, 3 Jul 13 17:27 /dev/ttyp3
with ‘mesg n’:
crw-----w- 1 alsdk users 5, 3 Jul 13 17:28 /dev/ttyp3

1) World (nobody) is able to ‘echo’ or ‘cat’ towards the terminal
echo “hello” >> /dev/ttyp3
cat mkdir >> /dev/ttyp3
2) The group seems to be incorrect, a normal terminal has default group tty

A xterm with ‘mesg y’ shows :
crw--w---- 1 ttielu tty 5, 5 Jul 13 17:27 ttyp5
and with ‘mesg n’ :
crw------- 1 ttielu tty 5, 5 Jul 13 17:27 ttyp5

Advice: use xterm

Bug found by TTIelu, reverse engineered by alsdk and TTIelu

Coleman Kane
16/07/04, 00:05
I'm using aterm 0.4.2 on my gentoo 2004.1 box. It looks like this:

cokane@schizophreniac:~> ls -l /dev/pts/16
crw--w---- 1 cokane tty 136, 16 Jul 14 00:09 /dev/pts/16

That is with mesg y. And I checked, it -is- pts/16.

On Tue, 2004-07-13 at 12:04, Maarten Tielemans wrote:
> Aterm has an issue with creating a terminal.
>
> A quick ls al on a aterm with mesg y shows:
> crw--w--w- 1 alsdk users 5, 3 Jul 13 17:27 /dev/ttyp3
> with mesg n:
> crw-----w- 1 alsdk users 5, 3 Jul 13 17:28 /dev/ttyp3
>
> 1) World (nobody) is able to echo or cat towards the terminal
> echo hello >> /dev/ttyp3
> cat mkdir >> /dev/ttyp3
> 2) The group seems to be incorrect, a normal terminal has default group tty
>
> A xterm with mesg y shows :
> crw--w---- 1 ttielu tty 5, 5 Jul 13 17:27 ttyp5
> and with mesg n :
> crw------- 1 ttielu tty 5, 5 Jul 13 17:27 ttyp5
>
> Advice: use xterm
>
> Bug found by TTIelu, reverse engineered by alsdk and TTIelu

Armin Wolfermann
16/07/04, 01:35
* Maarten Tielemans <TTIelu_DaInfraCrew@hotmail.com> [14.07.2004 00:26]:
> Aterm has an issue with creating a terminal.

=46rom the aterm ./configure --help output:

--enable-ttygid enable tty setting to group "tty" - use only if
your system uses this type of security

It works for me.

Sebastian Hans
16/07/04, 02:35
--f2QGlHpHGjS2mn6Y
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Maarten Tielemans wrote:
>=20
>=20
> Aterm has an issue with creating a terminal.
>=20
> A quick ?ls ?al? on a aterm with ?mesg y? shows:
> crw--w--w- 1 alsdk users 5, 3 Jul 13 17:27 /dev/ttyp3
> with ?mesg n?:
> crw-----w- 1 alsdk users 5, 3 Jul 13 17:28 /dev/ttyp3
>=20
> 1) World (nobody) is able to ?echo? or ?cat? towards the terminal
> echo ?hello? >> /dev/ttyp3
> cat mkdir >> /dev/ttyp3=20
> 2) The group seems to be incorrect, a normal terminal has default group t=
ty

When using devpts, it looks good:

$ mesg
is y
$ ls -Al /dev/pts/0
crw--w---- 1 phi xxx 136, 0 Jul 14 11:25 /dev/pts/0
$ mesg n
$ ls -Al /dev/pts/0
crw------- 1 phi xxx 136, 0 Jul 14 11:26 /dev/pts/0

Cheers

Seb
--=20
/~\ The ASCII Sebastian Hans
\ / Ribbon Campaign hanss@in.tum.de
X Against HTML 0x5AED1E6D
/ \ Email! 014C 4A54 FED4 C0B5 3E87 427B 6910 AB0A 5AED 1E6D

--f2QGlHpHGjS2mn6Y
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFA9QP3aRCrClrtHm0RAlb7AJ4qgRRS2n7Kw50RJ/E4WgE83WAekACfQw26
4DhqMTR6V/70Z8Vo+6RpnmQ=
=K6oI
-----END PGP SIGNATURE-----

--f2QGlHpHGjS2mn6Y--