rpcbind changes after bionic broke rup broadcast feature
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
rpcbind (Ubuntu) |
Invalid
|
Medium
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Eoan |
Invalid
|
Undecided
|
Unassigned | ||
Focal |
Invalid
|
Undecided
|
Unassigned |
Bug Description
When I call inetd services rup or rusersd in broadcast mode, I get answers from my Ubuntu 18.04 machines only. An Ubuntu 20.04 machine (here rzpc101) answers only when addressed directly:
zierke@rzpc100$ rup
rzpc100.
rzlinux.
rzpc174.
^C
zierke@rzpc100$ rup rzpc101
rzpc101.
zierke@rzpc100$ rusers
rzpc100.
rzlinux.
^C
zierke@rzpc100$ rusers rzpc101
rzpc101.
zierke@rzpc101$ lsb_release -rd
Description: Ubuntu 20.04.1 LTS
Release: 20.04
zierke@rzpc100$ lsb_release -rd
Description: Ubuntu 18.04.4 LTS
Release: 18.04
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: openbsd-inetd 0.20160825-4build1
ProcVersionSign
Uname: Linux 5.4.0-42-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu27.4
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Tue Aug 4 14:03:06 2020
InstallationDate: Installed on 2020-07-24 (11 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
SourcePackage: openbsd-inetd
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in openbsd-inetd (Ubuntu Bionic): | |
status: | New → Fix Released |
Changed in openbsd-inetd (Ubuntu Xenial): | |
status: | New → Fix Released |
Changed in openbsd-inetd (Ubuntu): | |
status: | New → Triaged |
Changed in openbsd-inetd (Ubuntu Eoan): | |
status: | New → Triaged |
Changed in openbsd-inetd (Ubuntu Focal): | |
status: | New → Triaged |
Changed in rpcbind (Ubuntu): | |
assignee: | Rafael David Tinoco (rafaeldtinoco) → nobody |
Unfortunately I had to time box myself from this issue while doing initial investigation...
I was able to reproduce the issue: after installing openbsd-inetd, tcpd and rstatd + rstat-client I could observe that only xenial and bionic hosts are the ones responding to UDP broadcast requests from "rup" binary:
(c)rafaeldtinoc o@xenial: ~$ rup
xenial.lxd 20:09 up 1:39, load 0.58 0.63 0.54
bionic.lxd 20:09 up 1:43, load 0.58 0.63 0.54
(c)rafaeldtinoc o@bionic: ~$ rup
xenial.lxd 20:12 up 1:42, load 0.39 0.50 0.51
bionic.lxd 20:12 up 1:46, load 0.39 0.50 0.51
(c)rafaeldtinoc o@eoan: ~$ sudo rup
xenial.lxd 20:12 up 1:51, load 0.62 0.52 0.49
bionic.lxd 20:12 up 1:55, load 0.62 0.52 0.49
(c)rafaeldtinoc o@focal: ~$ rup
xenial.lxd 20:12 up 1:42, load 0.28 0.46 0.50
bionic.lxd 20:12 up 1:47, load 0.28 0.46 0.50
So it is clear that the rpc-rstatd is the one to blame, as all clients can receive info from older ubuntu versions. I was curious because there were practically no changes in all related packages:
- openbsd-inetd
- tcpd (tcp-wrappers)
- rstatd
to justify a change of behavior so I checked syslog in the working nodes:
----
when hostname is given:
xenial rpc.rstatd[2961]: connect from 10.250.97.142 (10.250.97.142)
when broadcast is attempted:
xenial rpc.rstatd[2965]: connect from 127.0.0.1 (127.0.0.1)
and when broadcast is attempted with remote bionic (works):
bionic rpc.rstatd[6264]: connect from 127.0.0.1 (127.0.0.1)
bionic rpc.rstatd[6267]: connect from 127.0.0.1 (127.0.0.1)
----
and there might be something related to UDP broadcast and lo interface...
I backported:
openbsd-inetd 0.20160825-4build1
tcpd 7.6.q-30
rstatd 4.0.1-10
to bionic expecting to brake it and it did not happen =).
As I was running all as containers, on top of the same kernel, it is likely some environmental thing related to how tcp-wrappers are dealing with an UDP socket listening to broadcast.
----
Running inetd by hand (outside systemd scope) did not help also, the broadcast request did not even arrive to the socket as it seems, just the direct one:
(c)rafaeldtinoc o@eoan: ~$ sudo inetd -idl nobody: (default) builtin=0 server= /usr/sbin/ tcpd
pmap_set: 100001 1 17 41139
pmap_set: 100001 2 17 41139
pmap_set: 100001 3 17 41139
pmap_set: 100001 4 17 41139
pmap_set: 100001 5 17 41139
ADD: rstatd rpcprog=100001, rpcvers=5/1, proto=rpc/udp, wait.max=1.256 user:group=
someone wants rstatd
2830 execv /usr/sbin/tcpd
reaping asked for
2830 reaped, status 0
restored rstatd, fd 7
pmap_unset(100001, 1)
pmap_unset(100001, 2)
pmap_unset(100001, 3)
pmap_unset(100001, 4)
pmap_unset(100001, 5)
----
Checking tcpdump:
$ rup eoan.lxd and the eoan container shows:
20:46:39.145376 IP 10.250.97.227.57183 > 10.250.97.200.111: UDP, length 56 97.227. 57183: UDP, length 28 97.200. 60135: UDP, length 40 97.227. 51090: UDP, length 132
20:46:39.145486 IP 10.250.97.200.111 > 10.250.
20:46:39.145562 IP 10.250.97.227.51090 > 10.250.
20:46:39.150911 IP 10.250.97.200.60135 > 10.250.
$ rup with no args and eoan c...