regression in 'ip --family bridge neigh' since linux v4.12
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Bionic |
Fix Released
|
Medium
|
Unassigned | ||
Cosmic |
Fix Released
|
Medium
|
Unassigned |
Bug Description
[Impact]
* Netlink RTM_GETNEIGH requests for PF_BRIDGE are broken since linux v4.12.
* Users, tools (e.g., iproute2), and libraries (e.g., go netlink) that use
such request/family currently receive nothing back in the kernel response.
* The upstream fix resolves the breakage in the userspace-kernel interface
by explicitly checking for the old/broken request to ensure it's replied.
[Test Case]
* The command 'ip --family bridge neigh' returns nothing on broken kernels,
and matches 'bridge fdb show' on fixed kernels.
* Before:
$ ip --family bridge neigh
$
* After:
$ ip --family bridge neigh
dev ens3 lladdr 33:33:00:00:00:01 PERMANENT
dev ens3 lladdr 01:00:5e:00:00:01 PERMANENT
dev ens3 lladdr 33:33:ff:e9:9d:60 PERMANENT
* Reference:
$ bridge fdb show
33:
01:
33:
[Regression Potential]
* Low, for three reasons:
* The fix is fairly contained (RTM_GETNEIGH request for PF_BRIDGE family).
* The checks introduced by the fix are conservative, based on the size
of the old request (the size of the old/new requests are different),
and it does nothing different in case the (old) size doesn't match.
* Given the above, only applications with message length and contents
specially hand-crafted (and likely not valid nor useful) might fail.
To the best of my knowledge, this is not the common case out there.
[Other Info]
* The patch is only applicable to v4.12+ (so not Trusty nor Xenial).
* The patch is the same for Bionic, Cosmic, and unstable.
* Upstream commit: bd961c9bc664 ("rtnetlink: fix rtnl_fdb_dump() for ndmsg header")
https:/
* I'll submit the patch shortly to the kernel-team mailing list.
CVE References
summary: |
- regression in 'ip --family bridge neigh' since linux v4.12+ + regression in 'ip --family bridge neigh' since linux v4.12 |
description: | updated |
Changed in linux (Ubuntu): | |
status: | Incomplete → Confirmed |
Changed in linux (Ubuntu Bionic): | |
status: | New → Triaged |
Changed in linux (Ubuntu): | |
status: | Confirmed → Triaged |
importance: | Undecided → Medium |
Changed in linux (Ubuntu Bionic): | |
importance: | Undecided → Medium |
Changed in linux (Ubuntu Bionic): | |
status: | Triaged → Fix Committed |
Changed in linux (Ubuntu Cosmic): | |
importance: | Undecided → Medium |
status: | New → Fix Committed |
Changed in linux (Ubuntu): | |
status: | Triaged → Fix Released |
test on unstable:
-----------------
original:
$ uname -a
Linux mfo-sf194734 4.19.0-1-generic #2 SMP Mon Oct 8 14:38:01 -03 2018 x86_64 x86_64 x86_64 GNU/Linux
$ bridge fdb show 33:00:00: 00:01 dev ens3 self permanent 00:5e:00: 00:01 dev ens3 self permanent 33:ff:e9: 9d:60 dev ens3 self permanent
33:
01:
33:
$ ip --family bridge neigh
$
$ ./neighlist
$
modified:
$ uname -a 33:00:00: 00:01 dev ens3 self permanent 00:5e:00: 00:01 dev ens3 self permanent 33:ff:e9: 9d:60 dev ens3 self permanent
Linux mfo-sf194734 4.19.0-1-generic #2+sf1947341 SMP Mon Oct 8 12:57:16 -03 2018 x86_64 x86_64 x86_64 GNU/Linux
$ bridge fdb show
33:
01:
33:
$ ip --family bridge neigh
dev ens3 lladdr 33:33:00:00:00:01 PERMANENT
dev ens3 lladdr 01:00:5e:00:00:01 PERMANENT
dev ens3 lladdr 33:33:ff:e9:9d:60 PERMANENT
$ ./neighlist Neigh{LinkIndex :2, Family:7, State:128, Type:0, Flags:2, IP:net.IP(nil), HardwareAddr: net.HardwareAdd r{0x33, 0x33, 0x0, 0x0, 0x0, 0x1}, LLIPAddr: net.IP( nil), Vlan:0, VNI:0} Neigh{LinkIndex :2, Family:7, State:128, Type:0, Flags:2, IP:net.IP(nil), HardwareAddr: net.HardwareAdd r{0x1, 0x0, 0x5e, 0x0, 0x0, 0x1}, LLIPAddr: net.IP( nil), Vlan:0, VNI:0} Neigh{LinkIndex :2, Family:7, State:128, Type:0, Flags:2, IP:net.IP(nil), HardwareAddr: net.HardwareAdd r{0x33, 0x33, 0xff, 0xe9, 0x9d, 0x60}, LLIPAddr: net.IP( nil), Vlan:0, VNI:0}
netlink.
netlink.
netlink.