Package: util-linux
Version: 2.29-1
Severity: important
File: /sbin/sulogin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

sulogin does not exit after timeout expires.  This is serious
for any remote system configured with SULOGIN=yes since it
means that manual intervention is required to boot the system.

Reproducing the issue is simple: Just run sulogin with a short
timeout and observe that it doesn't exit.

strace shows that it does set an alarm, which is triggered,
but sulogin falls back to read() instead of exiting:

root@miraculix:/tmp# strace -ttf sulogin -t 3
15:18:25.711747 execve("/sbin/sulogin", ["sulogin", "-t", "3"], [/* 54 vars 
*/]) = 0
..
15:18:25.728448 ioctl(0, TIOCGWINSZ, {ws_row=46, ws_col=221, ws_xpixel=1787, 
ws_ypixel=740}) = 0
15:18:25.728487 ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
15:18:25.728518 ioctl(0, SNDCTL_TMR_START or TCSETS, {B38400 opost -isig 
-icanon -echo ...}) = 0
15:18:25.728547 ioctl(0, TCGETS, {B38400 opost -isig -icanon -echo ...}) = 0
15:18:25.728577 fcntl(0, F_GETFL)       = 0x8002 (flags O_RDWR|O_LARGEFILE)
15:18:25.728605 fcntl(0, F_SETFL, O_RDWR|O_LARGEFILE) = 0
15:18:25.728633 getpgid(0)              = 17003
15:18:25.728660 getppid()               = 17003
15:18:25.728687 getpgid(17003)          = 17003
15:18:25.728714 ioctl(0, TIOCGPGRP, [17003]) = 0
15:18:25.728747 dup2(0, 0)              = 0
15:18:25.728774 dup2(0, 1)              = 1
15:18:25.728805 dup2(0, 2)              = 2
15:18:25.728832 ioctl(0, TCGETS, {B38400 opost -isig -icanon -echo ...}) = 0
15:18:25.728890 ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost -isig 
-icanon -echo ...}) = 0
15:18:25.728916 ioctl(0, TCGETS, {B38400 opost -isig -icanon -echo ...}) = 0
15:18:25.728950 fcntl(0, F_GETFL)       = 0x8002 (flags O_RDWR|O_LARGEFILE)
15:18:25.729003 fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) 
= 0
15:18:25.729056 write(0, "Give root password for maintenan"..., 35Give root 
password for maintenance
) = 35
15:18:25.729106 write(0, "(or press Control-D to continue)"..., 34(or press 
Control-D to continue): ) = 34
15:18:25.729135 ioctl(0, TCGETS, {B38400 opost -isig -icanon -echo ...}) = 0
15:18:25.729162 ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost -isig 
-icanon -echo ...}) = 0
15:18:25.729186 ioctl(0, TCGETS, {B38400 opost -isig -icanon -echo ...}) = 0
15:18:25.729213 ioctl(0, TCGETS, {B38400 opost -isig -icanon -echo ...}) = 0
15:18:25.729238 ioctl(0, SNDCTL_TMR_CONTINUE or TCSETSF, {B38400 opost -isig 
-icanon -echo ...}) = 0
15:18:25.729264 ioctl(0, TCGETS, {B38400 opost -isig -icanon -echo ...}) = 0
15:18:25.729291 rt_sigaction(SIGALRM, {0x55a41bcac870, [], SA_RESTORER, 
0x7f7d12322040}, NULL, 8) = 0
15:18:25.729330 alarm(3)                = 0
15:18:25.729384 read(0, 0x7ffd819e1668, 1) = ? ERESTARTSYS (To be restarted if 
SA_RESTART is set)
15:18:28.730057 --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---
15:18:28.730204 rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system call)
15:18:28.730491 nanosleep({0, 250000000}, NULL) = 0
15:18:28.980823 read(0, 




Bjørn

- -- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.8.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages util-linux depends on:
ii  libblkid1      2.29-1
ii  libc6          2.24-7
ii  libfdisk1      2.29-1
ii  libmount1      2.29-1
ii  libncursesw5   6.0+20160917-1
ii  libpam0g       1.1.8-3.3
ii  libselinux1    2.6-3
ii  libsmartcols1  2.29-1
ii  libsystemd0    232-6
ii  libtinfo5      6.0+20160917-1
ii  libudev1       232-6
ii  libuuid1       2.29-1
ii  zlib1g         1:1.2.8.dfsg-2+b3

util-linux recommends no packages.

Versions of packages util-linux suggests:
ii  dosfstools          4.0-2
ii  kbd                 2.0.3-2
ii  util-linux-locales  2.29-1

- -- no debconf information

-----BEGIN PGP SIGNATURE-----

iQJBBAEBCgAsFiEE9GFvUSsROzwYJzwh4Zf8Eu/wXs0FAlg8P1wOHGJqb3JuQG1v
cmsubm8ACgkQ4Zf8Eu/wXs2DnA/1EPR0tg4scW1f0Sz9ya1R0vqn0srARB8WTLMA
nfNxIFOHhdJSWEjaqHTXbRw8LVSuF0OzpckuHjqRCNqPhkYws2u4ZcZbx+4oVmFB
S+oMjOxF7M8IaQjz37YaY+tmzH+6Tfj193ZLKdEZeFZ4qZ0k0duziyZVVDr0lgx1
lPe6oIUALCR97CLTYEpSGDOLwGW48xuM8wzVuwHh5ztfUlPkVNA1vAKvIitofkUD
aoOnVRDkLYXR8yuQbrZUcW4Fi7KpecrcVTtgVmriNFIYqd+D5d6CwmltIzx9AC2j
FkYRcEVDomwr8QQ/i0r3LxuDfwWpt3PZ0NGO+drwyAqqf+ZNgr9Y+KKLB0HZ3nm1
OlzCIID8wEYJ/uOT6N67S115EQhwZw6pxpEK/psXhUk4156VB6p6Qwl4CNcSksJp
YByzKSW/+t16cgplEWNegPSYwUeqLM0VtB73sEg9WE1NDETGiLXoQ+S01RKL4zmc
aXve4H7cR/gbkeCKTSTPE3V/ucPUHmBTGmt+nYyQzr0QJfj1hd8yZm8FCOoVQ1SZ
SmVp0oQtsURpINHnoD6/JZq5SdOf0hKaaRkxNnrBhlLYxECYMmACzGpkkWKQoIJ6
c2nGVrreDhPOS79+9WAPfg8IUg7Pxm1hWvo7Bx0JNeiETu7Ru6YX8eCSR7yq63xU
YCvnVg==
=upKW
-----END PGP SIGNATURE-----

Reply via email to