public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Logging-in using ssh elevates the user privilege.
@ 2019-03-06 16:00 Takashi Yano
  2019-03-06 16:15 ` Corinna Vinschen
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Takashi Yano @ 2019-03-06 16:00 UTC (permalink / raw)
  To: cygwin

Hello,

I would like to report a problem of recent cygwin.

If a user logs in via ssh, the user aqcuires the elevated
privilege if the user belongs to Administrators group.

The following log is the example of the behaviour.

[yano@Express5800-S70 ~]$ touch /cygdrive/c/windows/testfile
touch: cannot touch '/cygdrive/c/windows/testfile': Permission denied
[yano@Express5800-S70 ~]$ ssh localhost
yano@localhost's password:
Last login: Thu Mar  7 00:06:21 2019 from ::1
CYGWIN_NT-10.0-WOW Express5800-S70 3.0.2(0.338/5/3) 2019-03-05 19:01 i686 Cygwin
[yano@Express5800-S70 ~]$ touch /cygdrive/c/windows/testfile
[yano@Express5800-S70 ~]$ rm /cygdrive/c/windows/testfile
[yano@Express5800-S70 ~]$ exit
logout
Connection to localhost closed.
[yano@Express5800-S70 ~]$

Because of this behaviour, the process started in a ssh
session cannot be killed from a normal mintty session.

This also causes gnu screen to freeze.

To reproduce this:
(1) Start screen in mintty window.
(2) Detatch from the screen (Ctrl-A d).
(3) Login via ssh.
(4) Attach screen by 'screen -r' in ssh session.
(5) Detach from the screen (Ctrl-A d).
(6) screen freezes and is not terminated normally.

This does not occur if the user does not belong to
Administrators group.

I guess this is a problem of setuid codes.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: Logging-in using ssh elevates the user privilege.
@ 2019-03-07 11:14 Takashi Yano
  0 siblings, 0 replies; 22+ messages in thread
From: Takashi Yano @ 2019-03-07 11:14 UTC (permalink / raw)
  To: cygwin

On Wed, 06 Mar 2019 19:33:17 +0100 Achim Gratz wrote:
> This has been the case for as long as I use ssh logins and is by design.
> You can drop privileges after logon (see cygdrop), but not aquire new
> ones.
> 
> So if that's changed behaviour for you, then your ssh logins didn't
> actually work the way you thought they were.

Thank you for your reply. I had tried cygdrop, and confirmed that
the problems below cannot be solved by cygdrop.

But I don't understand why...

On Thu, 7 Mar 2019 01:00:00 +0900 Takashi Yano wrote:
> Because of this behaviour, the process started in a ssh
> session cannot be killed from a normal mintty session.
> 
> This also causes gnu screen to freeze.
> 
> To reproduce this:
> (1) Start screen in mintty window.
> (2) Detatch from the screen (Ctrl-A d).
> (3) Login via ssh.
> (4) Attach screen by 'screen -r' in ssh session.
> (5) Detach from the screen (Ctrl-A d).
> (6) screen freezes and is not terminated normally.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2019-03-09  7:47 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-06 16:00 Logging-in using ssh elevates the user privilege Takashi Yano
2019-03-06 16:15 ` Corinna Vinschen
2019-03-06 16:17   ` Corinna Vinschen
2019-03-07 10:08     ` Takashi Yano
2019-03-06 18:33 ` Achim Gratz
2019-03-07 11:23   ` Takashi Yano
2019-03-07 11:20 ` Andrey Repin
2019-03-07 15:35   ` Andrey Repin
2019-03-08 14:01     ` Takashi Yano
2019-03-08 14:11       ` Corinna Vinschen
2019-03-08 14:46         ` Takashi Yano
2019-03-08 14:52           ` Corinna Vinschen
2019-03-08 17:57             ` Andrew Schulman
2019-03-08 22:36               ` Takashi Yano
2019-03-08 23:19                 ` Andrew Schulman
2019-03-09  1:49                   ` Takashi Yano
2019-03-09  7:47                     ` Michael Wild
2019-03-08 15:39         ` Takashi Yano
2019-03-08 15:56           ` Corinna Vinschen
2019-03-08 16:21             ` Takashi Yano
2019-03-08 17:14               ` Corinna Vinschen
2019-03-07 11:14 Takashi Yano

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 read-only IMAP folder(s) and NNTP newsgroup(s).