[prev in list] [next in list] [prev in thread] [next in thread]
List: 9fans
Subject: [9fans] passwd(1) over ssh fails: race in telnetd
From: yaroslav <yarikos () gmail ! com>
Date: 2011-01-26 15:16:17
Message-ID: 1b38321dd9fcb942a015fd7101606737 () isd ! dp ! ua
[Download RAW message or body]
passwd(1), while started on telnetd-simulated /dev/cons (via ssh),
gets killed for writing on closed pipe after "Confirm:" message. I
think it is because of close()/open() race in
/sys/src/cmd/ip/telnetd.c:/^conssim/+/open/+/consctl/.
Readln opens and closes consctl, and when two readln calls are made,
next open may be attempted before the daemon reopens of its end of the
simulated consctl.
A fast workaround is injection of sleep(100) between readln calls in
/sys/src/cmd/auth/passwd.c:102.
Suggestions for the proper fix?
- Iaroslav
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic