9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: arisawa@ar.aichi-u.ac.jp
To: 9fans@nx.aichi-u.ac.jp
Subject: [9fans] secstore panic
Date: Fri,  9 Aug 2002 22:03:40 +0900	[thread overview]
Message-ID: <c03aace2509a6adeb7146a00ac952de4@ar.aichi-u.ac.jp> (raw)

Hello,

I examined secstore.
secstore fell into panic in changing password.
Note that is a experiment on terminal.

term% ls -l
--rw-rw-r-- M 250 arisawa arisawa 6 Aug  9 20:04 foo
term% rm foo
term% auth/secstore -s pc -g foo
secstore password: xxxxxxxx
secstore
term% ls -l
--rw------- M 250 arisawa arisawa 6 Aug  9 20:08 foo
term% cat foo
alice
term% auth/secstore -c -s pc
secstore password:
secstore
new password for arisawa:
retype password:
reencrypting 'foo'
saved 6 bytes
panic: D2B called on non-block 22bc0 (double-free?)
secstore 2563: suicide: sys: trap: fault read addr=0x0 pc=0x0000a5dd

acid says the problem came from secstore.c:

Out:
	if(newpass != nil){
		memset(newpass, 0, newpasslen);
		free(newpass);
	}
	conn->free(conn);	<------------ HERE
	return rv;
}

int
main(int argc, char **argv)
{
	int chpass = 0, rc;


By the way secuser created /adm/secstore/who/arisawa
the permission is:
term% ls -l /adm/secstore/*
d-rwxrwxr-x M 8 arisawa adm 0 Aug  9 20:01
/adm/secstore/store/arisawa
--rw-rw-r-- M 8 arisawa adm 195 Aug  9 20:01
/adm/secstore/who/arisawa
I believe they should be
d-rwx------ M 8 arisawa adm 0 Aug  9 20:01
/adm/secstore/store/arisawa
--rw------- M 8 arisawa adm 195 Aug  9 20:01
/adm/secstore/who/arisawa
Probably I should have created /adm/secstore with mode 700.
(Note that secstored is running as arisawa because experiment is on
terminal)
This is not documented in manual....

Kenji Arisawa



                 reply	other threads:[~2002-08-09 13:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c03aace2509a6adeb7146a00ac952de4@ar.aichi-u.ac.jp \
    --to=arisawa@ar.aichi-u.ac.jp \
    --cc=9fans@nx.aichi-u.ac.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).