lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48306DCA.9070108@t-online.de>
Date:	Sun, 18 May 2008 19:56:26 +0200
From:	Harald Dunkel <harald.dunkel@...nline.de>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
CC:	Vegard Nossum <vegard.nossum@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: 2.6.25.3: su gets stuck for root

Alan Cox wrote:
>> If I run "su someuser" as root, then it gets stuck. No prompt. I cannot
>> interrupt it with ^C or ^Z either. /var/log/auth.log says:
> 
> Is it then killable remotely, can you gdb it ?
> 

Attaching to the running stty failed:

# gdb stty 26465
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
Attaching to program: /var/tmp/coreutils-6.10/coreutils-6.10/src/stty, process 26465
/tmp/buildd/gdb-6.8/gdb/linux-nat.c:988: internal-error: linux_nat_attach: Assertion `pid == GET_PID (inferior_ptid) && WIFSTOPPED (status) && WSTOPSIG (status) == SIGSTOP' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
:


I can kill it with -9, but INTR, SEGV, BUS, etc. don't interrupt
it. And if I run stty inside of the debugger (or on the command
line), then it doesn't get stuck.

I have changed stty.c to do some print statements, and changed
root's .bashrc to use it for "stty intr ^C": It gets stuck
inside tcsetattr():

       printf("here we are\n");
       if (tcsetattr (STDIN_FILENO, TCSADRAIN, &mode))
	error (EXIT_FAILURE, errno, "%s", device_name);
       printf("born to be kings\n");

The previous tcgetattr() to read the old terminal settings shows
no problem (AFAICS).

Replacing TCSADRAIN by 0 doesn't help.



Regards

Harri
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ