Lucene search

K
cveLinuxCVE-2022-48910
HistoryAug 22, 2024 - 2:15 a.m.

CVE-2022-48910

2024-08-2202:15:05
Linux
web.nvd.nist.gov
34
linux kernel
net ipv6
vulnerability
resolved
multicast group
idev_mc_tomb
sysctl
network interface
ipv6 state
addrconf_notify
ipv6_disabled
ipv6_mc_down
ipv6_mc_up

CVSS3

5.5

Attack Vector

LOCAL

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

HIGH

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

AI Score

6.6

Confidence

High

EPSS

0

Percentile

5.1%

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

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

There are two reasons for addrconf_notify() to be called with NETDEV_DOWN:
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 NETDEV_DOWN, including ipv6_mc_down(), while never
calling the corresponding ipv6_mc_up() in between. This will cause a
new entry in idev->mc_tomb 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 IPV6_ADD_MEMBERSHIP (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 ipv6_mc_up() and ipv6_down() should only be run when this
state changes.

Implement this by remembering when the IPv6 state is ready, and only
run ipv6_mc_down() 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 NETDEV_UP /
    NETDEV_CHANGE returns early if ipv6 is disabled, and
  • the disable_ipv6=0 triggered codepath skips fully initializing the
    interface as long as addrconf_link_ready(dev) returns false
  • calling ipv6_mc_up() repeatedly does not leak anything

Affected configurations

Nvd
Vulners
Node
linuxlinux_kernelRange3.184.9.313
OR
linuxlinux_kernelRange4.104.14.278
OR
linuxlinux_kernelRange4.155.4.193
OR
linuxlinux_kernelRange5.55.10.104
OR
linuxlinux_kernelRange5.115.15.27
OR
linuxlinux_kernelRange5.165.16.13
OR
linuxlinux_kernelMatch5.17rc1
OR
linuxlinux_kernelMatch5.17rc2
OR
linuxlinux_kernelMatch5.17rc3
OR
linuxlinux_kernelMatch5.17rc4
OR
linuxlinux_kernelMatch5.17rc5
OR
linuxlinux_kernelMatch5.17rc6
VendorProductVersionCPE
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel5.17cpe:2.3:o:linux:linux_kernel:5.17:rc1:*:*:*:*:*:*
linuxlinux_kernel5.17cpe:2.3:o:linux:linux_kernel:5.17:rc2:*:*:*:*:*:*
linuxlinux_kernel5.17cpe:2.3:o:linux:linux_kernel:5.17:rc3:*:*:*:*:*:*
linuxlinux_kernel5.17cpe:2.3:o:linux:linux_kernel:5.17:rc4:*:*:*:*:*:*
linuxlinux_kernel5.17cpe:2.3:o:linux:linux_kernel:5.17:rc5:*:*:*:*:*:*
linuxlinux_kernel5.17cpe:2.3:o:linux:linux_kernel:5.17:rc6:*:*:*:*:*:*

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "net/ipv6/addrconf.c"
    ],
    "versions": [
      {
        "version": "3ce62a84d53c",
        "lessThan": "9a8736b2da28",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "3ce62a84d53c",
        "lessThan": "c71bf3229f9e",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "3ce62a84d53c",
        "lessThan": "9588ac2eddc2",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "3ce62a84d53c",
        "lessThan": "f4c63b24dea9",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "3ce62a84d53c",
        "lessThan": "b11781515208",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "3ce62a84d53c",
        "lessThan": "72124e65a70b",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "3ce62a84d53c",
        "lessThan": "9995b408f17f",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "net/ipv6/addrconf.c"
    ],
    "versions": [
      {
        "version": "3.18",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "3.18",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "4.9.313",
        "lessThanOrEqual": "4.9.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "4.14.278",
        "lessThanOrEqual": "4.14.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.4.193",
        "lessThanOrEqual": "5.4.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.10.104",
        "lessThanOrEqual": "5.10.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.15.27",
        "lessThanOrEqual": "5.15.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.16.13",
        "lessThanOrEqual": "5.16.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.17",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

CVSS3

5.5

Attack Vector

LOCAL

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

HIGH

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

AI Score

6.6

Confidence

High

EPSS

0

Percentile

5.1%