[Touch-packages] [Bug 2011458] Autopkgtest regression report (openssh/1:9.0p1-1ubuntu7.2)

2023-06-02 Thread Ubuntu SRU Bot
All autopkgtests for the newly accepted openssh (1:9.0p1-1ubuntu7.2) for 
kinetic have finished running.
The following regressions have been reported in tests triggered by the package:

hg-git/0.10.4-3 (amd64, arm64, armhf, ppc64el, s390x)
piuparts/1.1.5 (amd64, arm64, ppc64el, s390x)
sbuild/0.83.1ubuntu1 (arm64, ppc64el, s390x)


Please visit the excuses page listed below and investigate the failures, 
proceeding afterwards as per the StableReleaseUpdates policy regarding 
autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-
migration/kinetic/update_excuses.html#openssh

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to openssh in Ubuntu.
https://bugs.launchpad.net/bugs/2011458

Title:
  ssh fails to rebind when it is killed with -HUP

Status in openssh package in Ubuntu:
  Fix Released
Status in openssh source package in Kinetic:
  Fix Committed
Status in openssh source package in Lunar:
  Fix Committed

Bug description:
  [Impact]

  The sshd re-execution logic is generally broken with systemd socket 
activation, which means that (1) sshd fails when it is told to re-exec
  via SIGHUP (e.g. systemctl reload ssh), and (2) sshd fails when started in 
debug mode.

  [Test Case]

  (1) Test systemctl reload ssh:

  * On a machine with openssh-server installed, make a connection to
  localhost to activate ssh.service (the connection does not need to be
  complete, so you can just say "no" at the host key verification
  stage):

  $ ssh localhost
  [...]

  * Send SIGHUP to sshd by calling systemctl reload ssh:

  $ systemctl reload ssh

  * Check the service state:

  $ systemctl status ssh
  × ssh.service - OpenBSD Secure Shell server
   Loaded: loaded (/lib/systemd/system/ssh.service; disabled; preset: 
enabled)
  Drop-In: /etc/systemd/system/ssh.service.d
   └─00-socket.conf
   Active: failed (Result: exit-code) since Mon 2023-04-17 20:43:27 UTC; 4s 
ago
 Duration: 2min 44.132s
  TriggeredBy: ● ssh.socket
 Docs: man:sshd(8)
   man:sshd_config(5)
  Process: 1112 ExecStart=/usr/sbin/sshd -D $SSHD_OPTS (code=exited, 
status=255/EXCEPTION)
  Process: 1152 ExecReload=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
  Process: 1153 ExecReload=/bin/kill -HUP $MAINPID (code=exited, 
status=0/SUCCESS)
 Main PID: 1112 (code=exited, status=255/EXCEPTION)
  CPU: 79ms

  Apr 17 20:40:43 lunar systemd[1]: Started ssh.service - OpenBSD Secure Shell 
server.
  Apr 17 20:41:06 lunar sshd[1113]: Connection closed by 127.0.0.1 port 54666 
[preauth]
  Apr 17 20:43:27 lunar systemd[1]: Reloading ssh.service - OpenBSD Secure 
Shell server...
  Apr 17 20:43:27 lunar sshd[1112]: Received SIGHUP; restarting.
  Apr 17 20:43:27 lunar systemd[1]: Reloaded ssh.service - OpenBSD Secure Shell 
server.
  Apr 17 20:43:27 lunar sshd[1112]: error: Bind to port 22 on 0.0.0.0 failed: 
Address already in use.
  Apr 17 20:43:27 lunar sshd[1112]: error: Bind to port 22 on :: failed: 
Address already in use.
  Apr 17 20:43:27 lunar sshd[1112]: fatal: Cannot bind any address.
  Apr 17 20:43:27 lunar systemd[1]: ssh.service: Main process exited, 
code=exited, status=255/EXCEPTION
  Apr 17 20:43:27 lunar systemd[1]: ssh.service: Failed with result 'exit-code'.

  * On an affected machine, the service will fail as shown above.

  (2) Test debug mode:

  * On a machine with openssh-server installed, edit /etc/default/ssh to
  configure debug mode for sshd:

  $ cat /etc/default/ssh 
  # Default settings for openssh-server. This file is sourced by /bin/sh from
  # /etc/init.d/ssh.

  # Options to pass to sshd
  SSHD_OPTS=-ddd

  * Attempt to make a connection to localhost:

  $ ssh localhost
  kex_exchange_identification: read: Connection reset by peer
  Connection reset by 127.0.0.1 port 22

  * On an affected machine, the attempt will fail as shown above, and
  the service will be in a failed state:

  $ systemctl status ssh
  × ssh.service - OpenBSD Secure Shell server
   Loaded: loaded (/lib/systemd/system/ssh.service; disabled; preset: 
enabled)
  Drop-In: /etc/systemd/system/ssh.service.d
   └─00-socket.conf
   Active: failed (Result: exit-code) since Mon 2023-04-17 20:46:34 UTC; 
2min 27s ago
 Duration: 5ms
  TriggeredBy: ● ssh.socket
 Docs: man:sshd(8)
   man:sshd_config(5)
  Process: 1166 ExecStartPre=/usr/sbin/sshd -t (code=exited, 
status=0/SUCCESS)
  Process: 1167 ExecStart=/usr/sbin/sshd -D $SSHD_OPTS (code=exited, 
status=255/EXCEPTION)
 Main PID: 1167 (code=exited, status=255/EXCEPTION)
  CPU: 40ms

  Apr 17 20:46:34 lunar sshd[1167]: Server listening on :: port 22.
  Apr 17 20:46:34 lunar sshd[1167]: debug3: fd 4 is not O_NONBLOCK
  Apr 17 20:46:34 lunar sshd[1167]: debug1: Server will not fork when running 
in 

[Touch-packages] [Bug 2011458] Autopkgtest regression report (openssh/1:9.0p1-1ubuntu7.2)

2023-05-16 Thread Ubuntu SRU Bot
All autopkgtests for the newly accepted openssh (1:9.0p1-1ubuntu7.2) for 
kinetic have finished running.
The following regressions have been reported in tests triggered by the package:

gvfs/1.50.2-2 (ppc64el)
hg-git/0.10.4-3 (amd64, arm64, armhf, ppc64el, s390x)
nova/3:26.1.0-0ubuntu2.1 (armhf)
piuparts/1.1.5 (amd64, arm64, ppc64el, s390x)
sbuild/0.83.1ubuntu1 (amd64, arm64, ppc64el, s390x)
tinyssh/20190101-1ubuntu1 (amd64)


Please visit the excuses page listed below and investigate the failures, 
proceeding afterwards as per the StableReleaseUpdates policy regarding 
autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-
migration/kinetic/update_excuses.html#openssh

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to openssh in Ubuntu.
https://bugs.launchpad.net/bugs/2011458

Title:
  ssh fails to rebind when it is killed with -HUP

Status in openssh package in Ubuntu:
  Fix Committed
Status in openssh source package in Kinetic:
  Fix Committed
Status in openssh source package in Lunar:
  Fix Committed

Bug description:
  [Impact]

  The sshd re-execution logic is generally broken with systemd socket 
activation, which means that (1) sshd fails when it is told to re-exec
  via SIGHUP (e.g. systemctl reload ssh), and (2) sshd fails when started in 
debug mode.

  [Test Case]

  (1) Test systemctl reload ssh:

  * On a machine with openssh-server installed, make a connection to
  localhost to activate ssh.service (the connection does not need to be
  complete, so you can just say "no" at the host key verification
  stage):

  $ ssh localhost
  [...]

  * Send SIGHUP to sshd by calling systemctl reload ssh:

  $ systemctl reload ssh

  * Check the service state:

  $ systemctl status ssh
  × ssh.service - OpenBSD Secure Shell server
   Loaded: loaded (/lib/systemd/system/ssh.service; disabled; preset: 
enabled)
  Drop-In: /etc/systemd/system/ssh.service.d
   └─00-socket.conf
   Active: failed (Result: exit-code) since Mon 2023-04-17 20:43:27 UTC; 4s 
ago
 Duration: 2min 44.132s
  TriggeredBy: ● ssh.socket
 Docs: man:sshd(8)
   man:sshd_config(5)
  Process: 1112 ExecStart=/usr/sbin/sshd -D $SSHD_OPTS (code=exited, 
status=255/EXCEPTION)
  Process: 1152 ExecReload=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
  Process: 1153 ExecReload=/bin/kill -HUP $MAINPID (code=exited, 
status=0/SUCCESS)
 Main PID: 1112 (code=exited, status=255/EXCEPTION)
  CPU: 79ms

  Apr 17 20:40:43 lunar systemd[1]: Started ssh.service - OpenBSD Secure Shell 
server.
  Apr 17 20:41:06 lunar sshd[1113]: Connection closed by 127.0.0.1 port 54666 
[preauth]
  Apr 17 20:43:27 lunar systemd[1]: Reloading ssh.service - OpenBSD Secure 
Shell server...
  Apr 17 20:43:27 lunar sshd[1112]: Received SIGHUP; restarting.
  Apr 17 20:43:27 lunar systemd[1]: Reloaded ssh.service - OpenBSD Secure Shell 
server.
  Apr 17 20:43:27 lunar sshd[1112]: error: Bind to port 22 on 0.0.0.0 failed: 
Address already in use.
  Apr 17 20:43:27 lunar sshd[1112]: error: Bind to port 22 on :: failed: 
Address already in use.
  Apr 17 20:43:27 lunar sshd[1112]: fatal: Cannot bind any address.
  Apr 17 20:43:27 lunar systemd[1]: ssh.service: Main process exited, 
code=exited, status=255/EXCEPTION
  Apr 17 20:43:27 lunar systemd[1]: ssh.service: Failed with result 'exit-code'.

  * On an affected machine, the service will fail as shown above.

  (2) Test debug mode:

  * On a machine with openssh-server installed, edit /etc/default/ssh to
  configure debug mode for sshd:

  $ cat /etc/default/ssh 
  # Default settings for openssh-server. This file is sourced by /bin/sh from
  # /etc/init.d/ssh.

  # Options to pass to sshd
  SSHD_OPTS=-ddd

  * Attempt to make a connection to localhost:

  $ ssh localhost
  kex_exchange_identification: read: Connection reset by peer
  Connection reset by 127.0.0.1 port 22

  * On an affected machine, the attempt will fail as shown above, and
  the service will be in a failed state:

  $ systemctl status ssh
  × ssh.service - OpenBSD Secure Shell server
   Loaded: loaded (/lib/systemd/system/ssh.service; disabled; preset: 
enabled)
  Drop-In: /etc/systemd/system/ssh.service.d
   └─00-socket.conf
   Active: failed (Result: exit-code) since Mon 2023-04-17 20:46:34 UTC; 
2min 27s ago
 Duration: 5ms
  TriggeredBy: ● ssh.socket
 Docs: man:sshd(8)
   man:sshd_config(5)
  Process: 1166 ExecStartPre=/usr/sbin/sshd -t (code=exited, 
status=0/SUCCESS)
  Process: 1167 ExecStart=/usr/sbin/sshd -D $SSHD_OPTS (code=exited, 
status=255/EXCEPTION)
 Main PID: 1167 (code=exited, status=255/EXCEPTION)
  CPU: 40ms

  Apr 17 20:46:34 lunar sshd[1167]: Server listening on :: port 22.
  Apr 17 20:46:34 lunar sshd[1167]: debug3: fd 4 is