CVE-2022-48910

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-48910
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-48910.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-48910
Related
Published
2024-08-22T02:15:05Z
Modified
2024-11-08T17:45:49.188757Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
[none]
Details

In the Linux kernel, the following vulnerability has been resolved:

net: ipv6: ensure we call ipv6mcdown() at most once

There are two reasons for addrconfnotify() to be called with NETDEVDOWN: either the network device is actually going down, or IPv6 was disabled on the interface.

If either of them stays down while the other is toggled, we repeatedly call the code for NETDEVDOWN, including ipv6mcdown(), while never calling the corresponding ipv6mcup() in between. This will cause a new entry in idev->mctomb to be allocated for each multicast group the interface is subscribed to, which in turn leaks one struct ifmcaddr6 per nontrivial multicast group the interface is subscribed to.

The following reproducer will leak at least $n objects:

ip addr add ff2e::4242/32 dev eth0 autojoin sysctl -w net.ipv6.conf.eth0.disable_ipv6=1 for i in $(seq 1 $n); do ip link set up eth0; ip link set down eth0 done

Joining groups with IPV6ADDMEMBERSHIP (unprivileged) or setting the sysctl net.ipv6.conf.eth0.forwarding to 1 (=> subscribing to ff02::2) can also be used to create a nontrivial idev->mc_list, which will the leak objects with the right up-down-sequence.

Based on both sources for NETDEV_DOWN events the interface IPv6 state should be considered:

  • not ready if the network interface is not ready OR IPv6 is disabled for it
  • ready if the network interface is ready AND IPv6 is enabled for it

The functions ipv6mcup() and ipv6_down() should only be run when this state changes.

Implement this by remembering when the IPv6 state is ready, and only run ipv6mcdown() if it actually changed from ready to not ready.

The other direction (not ready -> ready) already works correctly, as:

  • the interface notification triggered codepath for NETDEVUP / NETDEVCHANGE returns early if ipv6 is disabled, and
  • the disableipv6=0 triggered codepath skips fully initializing the interface as long as addrconflink_ready(dev) returns false
  • calling ipv6mcup() repeatedly does not leak anything
References

Affected packages

Debian:11 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.106-1

Affected versions

5.*

5.10.46-4
5.10.46-5
5.10.70-1~bpo10+1
5.10.70-1
5.10.84-1
5.10.92-1~bpo10+1
5.10.92-1
5.10.92-2
5.10.103-1~bpo10+1
5.10.103-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:12 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.16.14-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.16.14-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}